The European Parliament has voted to pursue unprecedented disciplinary action against Hungary over alleged breaches of the EU's core values.

Prime Minister Viktor Orban's government has been accused of attacks on the media, minorities, and the rule of law - charges which he denies.

More than two-thirds of MEPs backed the censure motion - the first such vote against a member state under EU rules.

If also approved by national leaders, Hungary could face punitive measures.

They include stripping the country of voting rights at European Union level.

What is Hungary accused of?
Since coming to power, Mr Orban's government has taken a hardline stance against immigration. It introduced a law which made it a criminal offence for lawyers and activists to help asylum seekers, under the banner of "facilitating illegal immigration".

But there have also been reports of pressure being put on the courts and the electoral system, and of widespread corruption.

After the vote, the European Parliament said it was also concerned about:

The constitutional and electoral system
Privacy and data protection
Freedom of expression and religion
Academic freedom and freedom of association
Equal rights, particularly for refugees and minorities such as Roma and Jews

Mr Orban addressed the parliament on Tuesday in defence of his government, labelling the threat of censure as a form of "blackmail" and an insult to Hungary.

He claimed a report by Dutch Greens MEP Judith Sargentini was an "abuse of power", and included "serious factual misrepresentations".

Ms Sargentini's report into Hungary's ruling Fidesz party alleged such actions were "a clear breach of the values of our union".

What could happen now?
Under an EU rule called Article 7, breaching the union's founding principles can lead to the suspension of a member state's rights as a punitive measure.

However, Hungary is currently facing "preventative" measures, which the parliament says are designed to avoid sanctions entirely.

The BBC Reality Check team has explained the Article 7 process in detail. Broadly, the decision on Hungary will now be referred to the heads of the 28 EU member states to consider.

However, because this step has never been taken before, it is not clear what will happen next, or when.

Suspension of Hungary's voting rights is the most serious possible consequence - but is considered unlikely.

Poland is also facing disciplinary proceedings, launched by the European Commission in December last year. The case has yet to reach the European Parliament.

What has the reaction been?
Hungarian Foreign Minister Peter Szijjarto reacted angrily to the vote, calling it the "petty revenge" of "pro-immigration" politicians.

Some politicians from other countries also defended Mr Orban's government. Britain's Nigel Farage, a pro-Brexit MEP, wrote that the decision demonstrated "the authoritarian grip of the EU".

Anti-Islam Dutch populist Geert Wilders tweeted: "Hungary is the example for all EU countries and Orban is a hero and deserves the Nobel Prize."

But Ms Sargentini, who wrote the report on Mr Orban's government, said the decision sent an important message that the EU would stand up for citizens' rights.

"Viktor Orban's government has been leading the charge against European values by silencing independent media, replacing critical judges, and putting academia on a leash," she said.

"Individuals close to the government have been enriching themselves, their friends and family members at the expense of Hungarian and European taxpayers. The Hungarian people deserve better."

Amnesty International's expert on human rights in the EU, Berber Biala-Hettinga, hailed the vote as "historic".

"The European Parliament rightly stood up for the Hungarian people and for the EU. They made it clear that human rights, the rule of law and democratic values are not up for negotiation," she said.

Jean-Claude Juncker, President of the European Commission, said that he would have voted for the measure if he was an MEP.

"The European Commission is using the tools we have, launching infringement procedures against countries that don't respect EU law. [I] am in harmony with today's decision," he said through a spokeswoman's Twitter account.