Libyan border guards fired warning shots Friday to keep back a crowd of people trying to enter Tunisia as they fled the conflict in Libya, a Tunisian army officer said.
A Tunisian official was wounded by a stray bullet at the Ras Jdir crossing, where the incident took place and which was shut after the clashes.
The Tunisian foreign ministry urged its estimated 50,000 to 60,000 nationals in neighbouring Libya to leave "as soon as possible" because of violence that has raged there since mid-July.
"The ministry of foreign affairs urges Tunisians who find themselves in Libyan territory to return home as soon as possible," a ministry statement said.
Underlining "the deteriorating security situation in several Libyan cities", the ministry urged its citizens to contact Tunisian consular offices in Tripoli and Benghazi to facilitate their repatriation.
The Tunisian army officer said Libyan guards opened fire to push back hundreds of people attempting to force their way across the frontier.
The interior ministry said the head of national security at Ben Guerdane was hit in the leg by a stray bullet from the Libyan side of the border.
An AFP correspondent on the Tunisian side said gunfire was heard from the Libyan side late in the morning, leading to the crossing's closure.
"The Egyptians wanted to force their way through, and the Libyans fired," the Tunisian officer said. "If they cross, we will fire too."
Tunisian forces fired tear gas at the crowd, he added.
Tunisian interior ministry spokesman Mohamed Ali Arui said: "Closure of the crossing is temporary."
He said reinforcements have been sent to deal with any further incidents and to stop weapons or fighters getting through from Libya.
Arui could not say if anyone in the crowd had been hurt.
The ministry estimates 6,000 people are stranded on the Libyan side of Ras Jdir crossing.
Signup to our newsletter and follow us on Facebook and Twitter!
- Rumours of deaths -
Tunisia has been letting its own citizens through and also Libyans with the correct paperwork, but barring Arab and Asian foreigners unless they or their governments have arranged immediate repatriation.
Amid the confusion, there were rumours that the Libyans had actually fired into the crowd, and that a number of people had been killed, but no confirmation was available on the Tunisian side.
One woman who had fled the Libyan capital, and who did not want to be identified, said: "What you see on the border is nothing compared with what is happening there.
"Every day things get worse -- it's the end for Libya."
Less fortunate was a Tunisian woman, Amina Bouraoui, who was allowed past the Libyan controls but stopped by her compatriots.
She said her purse had been stolen and so she did not have her papers.
"I gave them the number of my ID card, but they wouldn't let me through," she said.
"I haven't eaten since yesterday, and am truly astonished that I am being treated like this by the authorities of my country," added the 31-year-old.
A group of 50 Indonesians had better luck Friday. They were allowed to cross after a vehicle with Indonesian diplomats was sent to evacuate them.
On Wednesday, Foreign Minister Mongi Hamad said Tunisia cannot cope with any massive influx of refugees who might seek to enter from Libya.
"Our country's economic situation is precarious, and we cannot cope with hundreds of thousands of refugees," as was the case during the 2011 revolution that ousted Libyan dictator Moamer Kadhafi.
Libya has suffered chronic insecurity since Kadhafi's overthrow, with the new government unable to check militias that helped to remove him and facing a growing threat from Islamist groups.
Fighting between rival militias in Tripoli has forced the closure of the city's international airport, while Islamist groups are battling army special forces in the eastern city of Benghazi.
In the past week, many countries have ordered their citizens to leave and, in some cases, have evacuated them.