The government must consult Parliament in order to invoke Article 50 and take Britain out of the European Union, the Supreme Court has ruled.

That means Parliament must take a vote on whether to invoke Article 50, which triggers the process to take Britain out of the EU, before Prime Minister Theresa May, can do so.

May had originally set a timetable to invoke Article 50 in March, but it remains to be seen whether that deadline will now be moved.

However, the judges ruled that the devolved parliaments in Cardiff, Edinburgh, and Belfast do not need to be consulted in order for the prime minister to proceed.

The Supreme Court decision was taken by a majority of eight judges, while three sided with the government.

Delivering the verdict, Lord Neuberger, President of the Supreme Court, said: “In broad terms, Article 50 provides that a country wishing to leave the EU must give a notice in accordance with its own constitutional requirements and that the EU treaties shall cease to apply to that country within two years.”

Noting that the ruling had no bearing on the decision to leave the EU, nor the timetable for such an event, Lord Neuberger said that the issue was only whether the government could trigger Article 50 without first consulting Parliament.

In that respect, the judges had found that “the government cannot trigger Article 50 without Parliament authorising that course”.

This is because “UK domestic law will change as a result of the UK ceasing to be party to the EU treaties and the rights enjoyed by UK residents granted through EU law will be affected.

“The fact that withdrawal from the EU would remove some existing domestic rights of UK residents also renders it impermissible for the Government to withdraw from the EU Treaties without prior Parliamentary authority.”

A secondary issue to come before the court was whether the government had to consult the devolved governments of the UK. The judges found that it did not.

In a statement, the court said: “The devolution Acts were passed by Parliament on the assumption that the UK would be a member of the EU, but they do not require the UK to remain a member. Relations with the EU and other foreign affairs matters are reserved to UK Government and Parliament, not to the devolved institutions… The devolved legislatures do not have a veto on the UK’s decision to withdraw from the EU.”

The ruling does not overturn the result of the referendum in June, in which the majority of Brits voted to leave the EU, but merely determines the path the government must take towards achieving that end.

In November, in a case brought to the High Court by investment manager Gina Miller and hairdresser Deir Tozetti Dos Santos, judges ruled that May does not have the authority to use the Royal Prerogative to invoke Article 50, ruling that the government’s arguments in favour of that process are “contrary to fundamental constitutional principles of the sovereignty of parliament”.

That ruling was controversial as a booklet on the referendum question issued by the government to every household in Britain before the vote included the promise: “This is your decision. The Government will implement what you decide.” The wording suggested that the people’s decision was a direct mandate to the government.

The government disagreed with the High Court ruling and appealed to the 11 judges of the Supreme Court to overturn it. But legal experts had advised May beforehand that she was likely to lose, and prepared four draft Acts of Parliament to cover all possible outcomes of the case.

They range from a highly detailed version making explicit that the government intends to withdraw from a range of EU institutions – such as Euratom, which controls the nuclear energy market – to one with the most basic wording possible.