Hungary will hold a referendum on European Union plans for a system of mandatory quotas, an initiative that Hungary's government has rejected, Prime Minister Viktor Orban said.

Orban has used harsh anti-migrant rhetoric since the migrant crisis escalated last year and gained notoriety for erecting a steel fence along Hungary's southern border to keep out migrants - a policy now adopted by other Balkan countries.

He said the plebiscite, the first of its kind in Europe, would be a major test of European democracy.

Orban has said the migrant quotas would redraw the ethnic, cultural and religious map of Hungary and Europe.

"Nobody has asked the European people so far whether they support, accept, or reject the mandatory migrant quotas," he said at a news conference.

"The government is responding to public sentiment now: we Hungarians think introducing resettlement quotas for migrants without the backing of the people equals an abuse of power."

Orban did not say when the referendum would be held.

He said he was aware of potential wider ramifications of such a referendum, especially if Hungarians say "No" to quotas.

"We had to think about the potential impact on European politics of such a proposal, but that was a secondary consideration," he said.

"To us this is a fundamental, unavoidable, essential question of Hungarian politics: can anyone else decide for Hungarians who we Hungarians should or should not live with?"

Political Capital Institute analyst, Peter Kreko, said: "All in all, we can see that Orban is in a winning position as long as he speaks about the migration issues, as it allows him to play the role of the defender of the nation."

"It is his interest to keep this issue on the agenda even until (elections in) 2018," Kreko said, noting that the referendum would eclipse problem issues such as in education and healthcare and pre-empt a potential political defeat for Orban if the European court rejects Hungary's suit against the quotas.

The European Union's executive had no immediate comment on Orban's announcement.

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.