The migrant rescue ship Lifeline, carrying 230 migrants, has docked in Malta after five days stranded at sea.

The controversial vessel has been accused by Italy and France of ignoring international rules while carrying out its rescues.

Malta has said it will detain the vessel while an investigation takes place.

The rescued migrants, meanwhile, will be taken in by Malta, France, Ireland, Italy, Luxembourg and Portugal.

Malta's Prime Minister Joseph Muscat said the country had no obligation under international law to assist the ship, but was doing so on humanitarian grounds.

Italy, a frequent destination for charity-run vessels like the Lifeline, has closed its ports to such vessels under a new government.

Another migrant rescue ship, Aquarius, was blocked from docking by both Italy and Malta earlier this month, spending days at sea with 630 migrants on board before being accepted by Spain.

In the case of the Lifeline, political leaders have claimed the vessel ignored international rules when carrying out its mission, refusing to co-operate with the Libyan coastguard.

Mr Muscat said the Lifeline's case was not about a disagreement between Malta and Italy on the fate of the rescued migrants.

"This is clearly an issue where the captain of a vessel disobeyed international rules," he said.

The Mission Lifeline charity, which operates the ship, denies any such claims and insists that its affairs are in order.

Italy's refusal to accept any rescue ships is indicative of a wider crisis in Europe on the issue.

More than 16,000 migrants have arrived there this year, and more than 600,000 since 2014. Italy wants its EU partners to take in a proportion of people under a quota system.

But several nations - Poland, Hungary, the Czech Republic and Slovakia - refuse to do so.

Migration is set to be a the top of the agenda when EU leaders meet on Thursday and Friday.

European Council President Donald Tusk warned that the debate "is becoming increasingly heated".

He called for the summit to agree to "regional disembarkation platforms" outside of Europe, a dedicated EU budget for migration control, and more co-operation with the Libyan coastguard.

In a letter, he warned of the political consequences for liberal democracy of failing to secure the European borders.

"More and more people are starting to believe that only strong-handed authority, anti-European and anti-liberal in spirit, with a tendency towards overt authoritarianism, is capable of stopping the wave of illegal migration," he wrote.

"The stakes are very high. And time is short."