In a scathing ruling, five High Court judges in Kenya have blocked a government-backed plan to make fundamental changes to the country's constitution.
The judgement is arguably the most significant ruling by Kenyan courts since President Uhuru Kenyatta's election win was nullified in 2017.
The judges said the constitution amendment bill, popularly referred to as the Building Bridges Initiative (BBI), was irregular, illegal and unconstitutional.
President Kenyatta and his political nemesis-turned-ally, Raila Odinga, unveiled the initiative after a truce following the contentious 2017 election, which saw violent clashes around the country.
The debate has dominated Kenya's politics for the past two years and is closely linked to the battle to succeed Mr Kenyatta, who is due to step down next year.
The two leaders said the initiative, which proposes, among others, the expansion of the executive arm of government, would make the country's politics more inclusive.
But critics say it is a selfish initiative to reward political dynasties, and that it will lead to a bloated parliament and executive which Kenya - a country already burdened by debt- cannot afford.
The BBI bill had been passed by the National Assembly and the Senate before Thursday's court ruling and was awaiting a presidential assent, after which Kenyans would have headed to a referendum before next year's elections.
What did the judges say?
In a four-hour televised ruling, they said President Kenyatta had violated the constitution by initiating a process which ought to have been started by ordinary citizens.
They also ruled that the BBI constitutional committee, a body created by the president, was illegal, adding that Mr Kenyatta had failed the leadership and integrity test.
They warned that the president could be sued in his personal capacity.
You may also be interested in:
The court also said that the five million signatures collected by the BBI taskforce to support the initiative did not make it a citizen-led process.
"A popular initiative to amend the constitution can only be started by the people not by the government," the judges said.
The declaration creates the grounds for the president to be impeached, but it is unlikely that parliament, which had already passed the bill, would dare to challenge President Kenyatta.
What are the BBI proposals?
The initiative proposes the creation of a prime minister post, at least 70 new constituencies, and an affirmative action clause that could create up to 300 new unelected members of parliament.
President Kenyatta and Mr Odinga argue that the proposed constitutional changes will end the winner-take-all structure of Kenyan politics, which is often followed by deadly violence.
But some argue that the current constitution which was promulgated in 2010 was a product of consensus and had served the country well despite relentless attempts by politicians to undermine it.
It was a product of the political crisis after the 2008 post-election violence which killed more than 1,500 people and forced hundreds of thousands from their homes.
What has the reaction been?
The judges stopped "a creeping coup by a kleptocracy that was trying to entrench itself in power," activist Okiya Omtatah, who first challenged the initiative in court, told the BBC Focus on Africa programme.
"The courts have asserted the rule of law. Kenya is a constitutional democracy where the executive and parliament have limited power. Whatever they do outside the confines of the law is null and void," he said.
He added: "The public good is contained in the law, so if you want to do anything let us do it according to the law."
The president of the Law Society of Kenya shared a video of himself dancing, with a Twitter post saying: "Reggae has been stopped."
The BBI initiative had been dubbed reggae, with its supporters adopting Lucky Dube's song "nobody can stop reggae" as a rallying call.
However, Paul Mwangi, who was part of the BBI secretariat, said the High Court ruling was "pure politics".
"It was the court literally descending into the political arena to push an agenda that had nothing to do with the legal issues which were there," Mr Mwangi told Focus on Africa.
"We are going to appeal all the way to the Supreme Court if necessary and we are confident that they will see that these were not legal issues being decided," he added.
What is the political impact?
The ruling is a huge blow to Mr Kenyatta who had staked his legacy on it.
So high were the stakes that MPs were allegedly given $1,000 (£700) bribes, to back it in parliament, a member of the national assembly told the BBC.
Even though the attorney general has indicated that the government would appeal against the High Court ruling, legal observers say a favourable outcome is unlikely.
Mr Kenyatta has had a contentious relationship with the judiciary since the Supreme Court annulled his election four years ago, forcing a rerun. At the time, he warned that he would "fix" the courts.
He has ignored several court orders in the last few years and some have speculated that he might do the same after Thursday's judgement.
The ruling is also a huge blow to Mr Odinga, a doyen of Kenyan politics for the last four decades.
For a politician who has defied huge odds in the past, the judgement is likely to be his biggest political setback yet, as he had planned to use the BBI wave to launch his fifth presidential bid in elections due next year.
But one man who is celebrating the development is Deputy President Willian Ruto, who has been sidelined by Mr Kenyatta since he started working with Mr Odinga.
Mr Ruto, who also plans to run for president, had opposed the BBI initiative.
He tweeted after the ruling: "There is God in heaven who loves Kenya immeasurably."