The U.K. Supreme Court has ruled that the government needs to get permission from the parliament on whether the government can start the Brexit process.

Although this is expected to happen in time for the government's 31 March deadline, Theresa May cannot begin talks with the EU until MPs and peers give their backing, according to the judgment.

However the Scottish Parliament and Welsh and Northern Ireland assemblies did not need a say, the court ruled.

Campaigners argued that denying the UK Parliament a vote was undemocratic during the Supreme Court hearing.

However even without the need for consulting MPs and peers, the government already had the powers to trigger Article 50 of the Lisbon Treaty - getting talks under way, the government said. The May government wants to do this by the end of March.

"By a majority of eight to three, the Supreme Court today rules that the Government cannot trigger Article 50 without an Act of Parliament authorising it to do so," said Supreme Court President Lord Neuberger while reading out the judgment.

However arguments in favor of the need for the Scottish Parliament, Welsh Assembly and Northern Ireland Assembly should get to vote on Article 50 before it is triggered was rejected by the court.

Lord Neuberger said: "Relations with the EU are a matter for the UK government."

The government was "disappointed" but would "comply" and do "all that is necessary" to implement the court's judgment, said Attorney General Jeremy Wright outside the court.

The Supreme Court noted that a process by which EU law becomes a source of UK law is created by the 1972 Act that took the UK into the then EEC. The EU law is an "independent and overriding source" of the UK's legal system as long as that act remains in force. This would remain the case unless Parliament decides otherwise.

A Downing Street spokesman said: "The British people voted to leave the EU, and the government will deliver on their verdict - triggering Article 50, as planned, by the end of March. Today's ruling does nothing to change that."

Brexit was "the most divisive issue of a generation", but added that her victory was "not about politics, but process", said Gina Miller, one of the campaigners who brought the case against the government.

Labour leader Jeremy Corbyn said: "Labour respects the result of the referendum and the will of the British people and will not frustrate the process for invoking Article 50."

It is expected that talks with the EU would last up to two years by the triggering of Article 50.

He would press for a second referendum on the final deal reached between the UK government and the EU, Liberal Democrat leader Tim Farron said.

Ms Miller, an investment manager, and hairdresser Deir Tozetti Dos Santos had brought the case against the government.

Last year a similar verdict was given by the High Court against which the government appealed.

51.9% of the voters had given their consent to leave the EU in last June's referendum.