The UN Security Council has issued a statement calling for an impartial inquiry into Israel's raid on a flotilla of Gaza-bound aid ships.

The statement said the investigation should be "prompt, impartial, credible and transparent".

It also condemned the "acts" which led to the deaths of at least 10 civilian activists during the operation.

The raid sparked strong international condemnation and calls for Israel to lift its three-year blockade of Gaza.

LEGALITY OF CONVOY RAID The UN Charter on the Law of the Sea says only if a vessel is suspected to be transporting weapons, or weapons of mass destruction, can it be boarded in international waters. Otherwise the permission of the ship's flag carrying nation must be sought.

The charter allows for naval blockades, but the effect of the blockade on civilians must be proportionate to the effect on the military element for the blockade to be legally enforceable.

A ship trying to breach a blockade can be boarded and force may be used to stop it as long as it is "necessary and proportionate".

The Israeli Defense Forces say soldiers acted in self-defence.

An investigation, either by the UN or by Turkey, is required to find if the use of force was proportionate to a claim of self defence. Profile: Free Gaza Movement Q&A: Israeli raid on aid flotilla Israeli raid: What went wrong? Guide: Gaza under blockade Convoy raid sparks press fury In pictures: Aid flotilla raid protests

The UN statement was reached after hours of discussion as the council deliberated through the night.

In Turkey, Prime Minister Recep Tayyip Erdogan called Israel's raid a "bloody massacre" as he addressed parliament.

Egyptian President Hosni Mubarak has ordered the border crossing between Egypt and the Gaza Strip to be opened. The Rafah crossing has been closed since 2007, although special medical cases are occasionally allowed through.

The Egyptian state news agency said the latest opening was to allow humanitarian aid through. It is not clear how long it will be kept open.

The UN statement was the result of a compromise between Turkey and the US. Turkey was reluctant to water down its criticism of Israel while the US - Israel's closest ally - wanted to temper the language used, says the BBC's UN correspondent Barbara Plett in New York.

Turkey is furious at the commando raid, which targeted a Turkish ship and appeared to have killed mostly Turkish activists, she says.

The compromise removed direct condemnation of Israel and removed references to an international investigation, our correspondent adds.

It also weakened demands for an end to the economic blockade of Gaza that the activists were trying to break, but the incident has refocused international attention on the siege and many states have renewed calls for it to be lifted, she says.

The Palestinian Observer at the UN, Riyad Mansour, said he was disappointed that the language in the final draft had been softened.

In its statement, the Security Council said it "deeply regretted the loss of life and injuries resulting from the use of force during the Israeli military operation in international waters against the convoy sailing to Gaza".

AT THE SCENE Here at Beersheva prison in the Negev Desert, in the sweltering heat, a procession of foreign diplomats and lawyers has been trying to gain access to the prisoners. Most have been let in and so has a party from the International Red Cross. Those who have come out have not said much more than that they have been able to see their prisoners. Behind the blue and white 8m-high concrete walls, more than 600 people are being held. For how long and to what purpose is not yet clear. Perspiring journalists can be seen scanning the Israeli newspapers, the headlines reading "Botched raid on Free Gaza Flotilla" and "Flotilla Fiasco".

The council "condemns those acts which resulted in the loss of at least 10 civilians and many wounded, and expresses its condolences to their families".

The council requested the immediate release of the ships as well as the civilians held by Israel.

It also stressed that the situation in Gaza was "not sustainable".

Shortly after the UN statement was released, several Gaza militants crossed the border into Israel and exchanged fire with troops, the Israeli military said. Two militants were killed, it said.

Russia and the European Union have also jointly called for an impartial inquiry into the Israeli operation and for crossings into Gaza to be opened.

'Self-defence'

Israel's UN envoy said troops acted in self-defence, charges the campaigners deny.

"This flotilla was anything but a humanitarian mission," Israel's deputy UN ambassador Daniel Carmon said.

He said the activists had used "knives, clubs and other weapons" to attack the soldiers who boarded the lead boat, the Mavi Marmara.

Captain Arye Shalicar of the Israel Defense Forces, who was part of Monday's operation, says the commandos began the raids armed with paint ball guns.

"I was, myself, on one of the boats, the Israeli boats, approaching the flotilla," he told the BBC's World Today programme.

The Security Council deeply regrets the loss of life and injuries resulting from the use of force during the Israeli military operation in international waters against the convoy sailing to Gaza UN Security Council statement UN text on Israel convoy raid Send us your comments

"It is true that the Israeli commander unit... came on board with paint ball weapons... in order to disperse [people] if there was violence. They were ready for a violent... demonstration on board the flotilla, especially on the big boat, the Marmara. No-one really expected that there would be such a violent outcome of what happened.

"First, you know, the soldiers tried to disperse, but in the end when they were shot at, you know when there was shooting... from the other side, there's no other way than turning from paint ball to live ammunition."

The campaigners say the soldiers opened fire without any provocation.

Of the 679 surviving activists, who were brought to the Israeli port of Ashdod, only 50 agreed to be voluntarily deported and more than 30 are being treated in hospital for their injuries, reports the BBC's Wyre Davies in Jerusalem.

That means that almost 600 people, from several countries, are still being held in detention centres across Israel and being questioned by the authorities.

Israel has imposed an information blackout, making it difficult to gather first-hand accounts from the campaigners.

The ships were carrying 10,000 tonnes of aid in an attempt to break Israel's three-year blockade of the Gaza Strip.

Israel says it will deliver the ships' aid cargo to Gaza by land.

Nato ambassadors are due to hold emergency talks in Brussels at Turkey's request to discuss the raid.

Israeli Prime Minister Benjamin Netanyahu said he regretted any loss of life, but gave full backing to the action of the Israeli troops.

Mr Netanyahu cut short a visit to Canada to deal with the growing crisis and cancelled a scheduled meeting in Washington with US President Barack Obama on Tuesday. He is due back in Israel on Tuesday.

Israel tightened its blockade of the Gaza Strip after Hamas seized power there in 2007.

Israel says it allows about 15,000 tonnes of humanitarian aid into Gaza every week, but the UN says this is less than a quarter of what is needed.