Hungarian Prime Minister Viktor Orban suffered a blow in his referendum against the EU's migrant quota plan after he failed to rally enough votes to reach the required 50% turnout, according to the first polls from the ruling Fidesz party.

Although a whopping 98% of those who voted supported his bid to reject the proposal, turnout reached just below 44% of the eight-million-strong electorate, falling short of a 50% threshold.

The party's deputy chief Gergely Gulyas nonetheless saw the result as "a sweeping victory for all those who reject the relocation plan, for those who believe that only nation states should remain, and for those who believe in democracy".

"Brussels cannot force its will on Hungary," the defiant Mr Orban told his supporters in Budapest.

His right-wing government led an expensive media offensive urging voters to spurn the EU's quota plan, which aims to share migrants around the 28 member states without the consent of national parliaments.

Hungary migrant referendum

Mr Orban said the task in the next few months would be to prevent Brussels imposing rules that would forcefully settle migrants.

While Budapest says immigration policy should be a matter of national sovereignty, human rights groups have criticised the government for stoking fears and xenophobia, and for mistreating refugees on the border.

On Friday, around 1,500 people demonstrated in the capital city, Budapest, against the referendum.

Mr Orban's hardline approach on migration has won allies in Central Europe. Eastern Europe's ex-communist states, now in the EU, are opposing a policy that would require all EU countries to take in some of the hundreds of thousands of people seeking asylum in the bloc.

Mr Orban has linked mass immigration from the Middle East to an increased risk of violent attacks in EU societies.

The strong anti-migrant rethoric has gone down well with many Hungarians at home, cementing his Fidesz party's lead over the opposition.