Parliament must vote on whether the UK can start the process of leaving the European Union, the High Court has ruled.
This means the government cannot trigger Article 50 of the Lisbon Treaty - beginning formal discussions with the EU - on their own.
Theresa May says the referendum - and existing ministerial powers - mean MPs do not need to vote, but campaigners called this unconstitutional.
The government is expected to appeal.
Ministers were given the go-ahead for a further hearing to take place at the Supreme Court, which is expected to take place before the end of the year.
The prime minister has said she will activate Article 50, formally notifying the EU of the UK's intention to leave, by the end of next March. This follows the UK's decision to back Brexit in June's referendum by a margin of 51.9% to 48.1%.
The EU's other 27 members have said negotiations about the terms of the UK's exit - due to last two years - cannot begin until Article 50 has been invoked.
BBC assistant political editor Norman Smith said, if the court's decision is not overturned, there could be "months and months" of parliamentary hurdles ahead.
But he added that most MPs would be likely to vote for Article 50, as Brexit was backed by a majority of voters in the referendum.