BICSKE, Hungary/MUGLA, Turkey Sept 3 (Reuters) -- Migrants forced from a train threw themselves onto railway lines and scuffled with helmeted riot police in Hungary on Thursday as politicians across Europe struggled to respond to public opinion appalled by images of a drowned 3-year-old boy.
France said European countries must be required to accept their share of refugees, proposing what would potentially be the biggest change to the continent's asylum rules since World War Two.
Europe's worst refugee crisis since the Yugoslav wars of the 1990s has strained the European Union's asylum system to breaking point, dividing its 28 nations and feeding the rise of right-wing populists.
Hundreds of thousands of refugees from wars in the Middle East, along with economic migrants fleeing poverty in Africa and Asia, have braved the Mediterranean Sea and land routes across the Balkans to reach the European Union. Thousands have died at sea and scores have perished on land.
Nearly all first reach the EU's southern and eastern edges before pressing on for richer and more generous countries further north and west, above all Germany, which has emphasized its moral duty to accept those fleeing genuine peril.
Saying some European countries had failed to "assume their moral burdens," French President Francois Hollande said he had agreed with German Chancellor Angela Merkel on "a permanent and obligatory mechanism" to allocate refugees across the bloc.
"I believe that today what exists is no longer enough," he said. "So we will need to go further."
European politicians acknowledged the impact on Thursday of images of a 3-year-old boy in a red T-shirt and tiny sneakers face down in the surf of a Turkish beach, which gave a haunting human face to the tragedy of thousands dead at sea.
"He had a name: Alyan Kurdi. Urgent action required - A Europe-wide mobilization is urgent," French Prime Minister Manuel Valls said on Twitter.
The boy's 5-year-old brother Galip and 35-year-old mother Rehan were also among 12 people who died when two boats carrying 23 capsized while trying to reach a Greek island.
"LET THIS BE THE LAST"
His father Abdullah Kurdi, who was rescued barely conscious, collapsed in tears after emerging from a morgue where the bodies were held.
"The things that happened to us here, in the country where we took refuge to escape war in our homeland, we want the whole world to see this," Abdullah told reporters.
"We want the world's attention on us, so that they can prevent the same from happening to others. Let this be the last," he said.
Hungary has emerged as the primary entry point for those reaching the EU overland across the Balkans, and its right-wing government has become one of the most vocal on the continent opposing large-scale immigration.
Thursday brought a days-long stand-off to a pitch as Hungarian authorities who refused to let migrants board trains for Germany for days finally allowed hundreds onto a train bound for the Austrian frontier - only to halt it at Bicske, a town outside Budapest with an immigration registration center.
Hundreds of exhausted people had crammed aboard, clinging to doors and squeezing their children through open carriage windows. When the train was halted, most refused to get off.
Police cleared one carriage, while five more stood at the station in the heat. Fearing detention, some migrants banged on windows chanting "No camp! No camp!"
One group pushed back dozens of riot police guarding a stairwell to fight their way back on board. One family -- a man, his wife and their toddler -- made their way along the track next to the train and lay down in protest. It took a dozen riot police wrestling with the man to get them up again.
"We need water," said a Syrian man still on the train who gave his name as Midu. "Respect the humans in here; no respect for the humans. We want to go to Germany, not here," he said in English.
Hollande's announcement of an agreement with Merkel on a mandatory system to allocate refugees would transform the asylum rules for the 28-member EU, which operates common frontiers but requires countries to process refugees separately.
The major EU states have taken sharply opposing positions on how far to open their doors, symbolized most prominently by Germany and Britain.
Germany plans to receive 800,000 refugees this year and has budgeted billions in additional welfare spending for them. It announced last month that it would allow Syrians to apply for asylum no matter where they first reached the EU.
"As one of the world's richest countries, with good infrastructure, a viable welfare state and a solid budget surplus, we are in a position to rise to the occasion," German Labour and Social Affairs Minister Andrea Nahles said at a briefing ahead of a G20 meeting in Turkey on Thursday.
Britain, by contrast, has set up a program to allow in vulnerable Syrians that has admitted just 216. It has also granted asylum to around 5,000 Syrians who managed to reach British shores since the war began four years ago, but Prime Minister David Cameron has opposed mandatory EU refugee quotas.
"There isn't a solution to this problem that's simply about taking people," he said in televised comments on Thursday.
His hardline stance has come under fire even from within his own Conservative Party: "We cannot be the generation that fails this test of humanity. We must do all we can," tweeted Conservative member of parliament Nicola Blackwood.
Other EU states are also likely to strongly resist a system that would require them to take in large numbers of refugees. Poland said it would oppose "automatic quotas."
Hungary's right-wing Prime Minister Viktor Orban met European officials in Brussels on Thursday and described the crisis as a problem for Germany - which had offered to admit the refugees - not for Europe as a whole.
By forcing refugees to register, Hungary was just obeying EU rules, he argued. Europeans were "full of fear because they see that the European leaders ... are not able to control the situation."
Lawmakers in Budapest were debating raft of amendments to Hungary's migration laws that the ruling party said would cut illegal border crossings to "zero." They provide for holding zones on the country's southern border with Serbia, where construction crews are completing a 3.5-meter-high fence.
In an opinion piece for Germany's Frankfurt Allgemeine Zeitung, Orban wrote that his country was being "overrun" with refugees. He noted that most were Muslims, while "Europe and European culture have Christian roots."