The Libyan government threatened Friday to attack ships carrying humanitarian aid into Misurata, on the same day that NATO said it had intercepted Libyan government vessels trying to lay anti-ship mines in the harbor.

“This is another demonstration of [Moammar] Gaddafi trying to completely ignore humanitarian law,” said Brig. Gen Rob Weighill, speaking via the Internet from the Naples headquarters of NATO’s Operation Unified Protector. The Libyan vessels were driven back by the threat of a NATO attack, he said.

Libya’s government says the port, which it has repeatedly shelled, is also being used by the rebels to deliver arms and “terrorists” to Misurata.

“We will not allow weapons and supplies to come from the seaport to the rebels,” government spokesman Moussa Ibrahim said at a news conference. “The port is under our control range. No one can move if we don’t want them to be there.”

Ibrahim said the government would consider requests from international organizations to evacuate thousands of foreign migrant workers stranded there but would not allow deliveries.

“We cannot accept people coming with ships that we cannot search and investigate,” he said, adding that aid groups had to deal solely with Libya’s sovereign government, not a rebel force.

“Any attempt to enter the port will be attacked, regardless of the justifications,” Libyan state television said.

Ibrahim said the government was working with the United Nations and the Red Cross to open a land corridor to deliver aid to Misurata, although it has repeatedly declined to offer any pause in the shelling of the city for aid to be delivered.

Hundreds of people have died in the siege from indiscriminate government shelling of residential areas. On Friday, the Libyan army used tanks to fire on the city, killing 15 people and wounding more than 50 more, said Aiman Abu Shahma, a member of the city’s medical council.

Rebel spokesman Mohamed Ali said the government was overstating its ability to prevent aid being delivered and described the threat as “a sign of desperation.”

Elsewhere, fighting spilled over Libya’s western border for a second day Friday, with forces loyal to Gaddafi crossing into a Tunisian town, wounding several civilians with what witnesses described as indiscriminate gunfire and prompting an angry reaction from the government in Tunis.

Government troops battled rebels for control of the Libyan checkpoint at Wezen, then apparently fled across the border and into the Tunisian town of Dehiba, a day after a similar cross-border flight by rebels.

In Dehiba, they clashed again with rebels there, as well as with local residents and Tunisian soldiers, before surrendering. Residents told Reuters news agency that shells had also fallen on the town.

Tunisia summoned Libya’s ambassador to protest the incursions, saying several people had been hurt, 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,” Tunisia’s deputy foreign minister, Radhouane Nouicer, said on al-Jazeera television. “Tunisian soil is a red line, and no one is allowed to breach it.”

Control of the border post on the Libyan side has swung back and forth during the conflict, falling to the rebels a week ago before government forces regained control Thursday. By Friday morning, rebels said they were back in charge of what is an important lifeline for them, to towns and villages they control in the remote Western Mountains.

“Gaddafi forces are no longer in Dehiba. They were defeated,” a witness who gave his name as Akram told the Associated Press.

Tunisia toppled its own long-standing leader, Zine el-Abidine Ben Ali, in a revolution in January that inspired similar uprisings throughout the Middle East, and many Tunisians are sympathetic to Libya’s rebels.

The Libyan troops were later taken back across the border, Tunisia’s Defense Ministry said. The main crossing between Tunisia and Libya, on the coast a two-hour drive to the north, remains firmly under Libyan government control.

Cody reported from Paris.