Hungary's parliament has narrowly rejected a plan by Prime Minister Viktor Orban to ban the resettlement of migrants in the country, a setback for the maverick leader that could weaken him in his fight against EU migration policies.

The proposed constitutional amendment won 131 votes in the 199-seat parliament, just short of the necessary two-thirds majority of 133. Opposition parties, including the far-right Jobbik, had boycotted the vote.

Orban had said the amendment was needed to honour an October referendum, in which more than 3 million Hungarians, an overwhelming majority of those who voted, rejected EU migrant quotas. 

He said that even though the referendum was not legally binding because of low turnout, it gave him a strong political mandate to reject the imposition by Brussels of quotas stipulating how many migrants Hungary must accept.

Orban's determination to keep out migrants has angered his fellow leaders and complicated their task as the EU struggles to cope with an influx of about 1.4 million people since the start of 2015, many fleeing conflicts like the war in Syria.

Last year Hungary was the key entry point into the EU's border-free Schengen zone until Orban erected a razor-wire border fence to stop the flow.

"This vote today is a temporary fiasco (for Orban), similarly to the referendum which was invalid," said Robert Laszlo, a political analyst at thinktank Political Capital.

Laszlo said at home, the failure of the amendment was unlikely to weaken Orban, whose Fidesz party has a strong lead in opinion polls ahead of 2018 elections.

"In Brussels, he will not be able to sell this as a success, there his positions will weaken," he added.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.