DEHIBA, Tunisia (Reuters) - Forces loyal to Libyan leader Muammar Gaddafi fought a gun battle with Tunisian troops in a frontier town on Friday as Libya's conflict spilled over its borders.
NATO accused Gaddafi's forces of mining the harbour of the rebels' besieged western outpost of Misrata, to block aid ships. Libyan state television said the port, providing a lifeline to the eastern rebel heartland, had been rendered "non-functional".
"Any attempt to enter the port will be attacked, regardless of the justifications," it added.
Pro-Gaddafi forces shelled the town of Dehiba, damaging buildings and wounding at least one resident, and a squad drove into the town in a truck chasing anti-Gaddafi rebels.
Tunisian deputy foreign minister Radhouane Nouicer, speaking on Al Jazeera television, said casualties had been inflicted, including a young girl.
"We summoned the Libyan envoy and gave him a strong protest because we won't tolerate any repetition of such violations. Tunisian soil is a red line and no one is allowed to breach it," he said.
Gaddafi's son Saif al-Islam, long seen as a successor to his father, told state television there would be no surrender "if the bombings last for 40 days or even 40 years.
"(Libya's) green flag will remain high."
For the last few days Libyan troops have been harrying rebels from the Western Mountains region. On Thursday, they overran the rebel-held Dehiba border post. Insurgents fled into Tunisia and fighting spilled onto Tunisian soil.
A Reuters cameraman who crossed into Libya saw the bodies of three Gaddafi soldiers on the ground. It was not clear if they had been shot by the rebels or by the Tunisian military.
Tunisian border guards had shut down the border, he said. They were laying barbed wire and fortifying their positions.
Columns of Libyan refugees fleeing the fighting in the Western Mountains were reaching the crossing but were unable to get through.
Reuters photographers in Dehiba, a short distance from the border, saw several abandoned pick-up trucks which Gaddafi loyalists had driven. One had a multiple rocket launcher on the back. Another, which had overturned and lay upside down in the sand, was fitted with a heavy calibre machine gun.
Tunisia's defence ministry said the Libyan soldiers who crossed the border had all been gathered up and taken home.
Tunisia toppled its own veteran leader, Zine al-Abidine Ben Ali, in a revolution earlier this year that triggered turmoil through the Middle East and many Tunisians are sympathetic to the rebels fighting Gaddafi's forces.
While Dehiba was under fire, the rebels, who are fighting to end more than four decades of Gaddafi rule, announced they had recaptured the border post.
Rebels seized the post a week ago. It controls the only road link which their comrades in the Western Mountains have with the outside world, making them rely otherwise on rough tracks for supplies of food, fuel and medicine.
"Right here at this point I'm looking at the new flag flying up there at the border. The rebels have got control of it, the freedom fighters. We're just in the process of opening it up," rebel Akram el Muradi said by telephone.
After nightfall, Gaddafi's forces resumed their bombardment of the post in an apparent attempt to return.
The main crossing into Libya, two hours' drive to the north, remains firmly under Libyan government control.
Friday's clashes marked the first time government ground forces had crossed the border and entered a Tunisian town.
Inside Libya, NATO air strikes hit Gaddafi troops attacking rebel-held Zintan, a rebel spokesman said from there. But that did not stop the loyalists from firing 20 rockets into the city later in the day, the spokesman said.
In the rebel stronghold Benghazi, a doctor said shelling by Gaddafi's forces in the besieged city of Misrata killed 12 people on Thursday, including two women. He said the dead were victims of rocket and mortar fire.
in Benghazi, Tarek Amara and Matthew Tostevin in Tunis and Hamid Ould Ahmed in Algiers; Writing by Christian Lowe; Editing by Matthew Tostevin and Ralph Boulton)