By Tarek Amara
TUNIS (Reuters) - Rebels took control of the Ras Jdir border post on Libya's frontier with Tunisia on Friday after clashes with soldiers loyal to Muammar Gaddafi, witnesses said.
Fighters hoisted the green, red and black rebel flag over official buildings at the crossing, which lies along a key coastal resupply route from Tunisia to Tripoli.
"We can see the flag," local resident Fathi Chandol said. A second witness said he could also see the flag and added it was clear the rebels had taken the post.
Clashes between "large numbers" of rebels and pro-Gaddafi soldiers occupying the border crossing had erupted earlier in the day, Chandol said.
Security sources in Tunisia said negotiations had been taking place between Tunisian officials and Gaddafi representatives to hand over control of the Ras Jdir crossing to the rebels in an attempt to avoid violence.
Tunisian state television later reported that some pro-Gaddafi soldiers had turned themselves over to the Tunisian military, but gave no further details.
The Libyan insurgents are keen to control the crossing because it will allow them to bring in supplies of food, water and other essentials from Tunisia, and potentially seal off an escape route for Gaddafi and his entourage.
Libyan rebels already control the Wazen Dhehiba crossing further to the south.
Dozens of pro-Gaddafi Tunisians from the border town of Ben Guerdane had earlier assaulted Libyan refugees near the frontier who were seeking to help the rebels, punching and insulting them, a resident told Reuters.
"These were pro-Gaddafi Tunisians, likely smugglers who were profiting under Gaddafi's regime," the resident said, adding there were no serious injuries.
(Writing by Marwa Awad and Richard Valdmanis; Reporting by Tarek Amara; Editing by Mark Heinrich and Giles Elgood)