When Boris Johnson succeeded Theresa May as British prime minister this summer, few dared to make definite predictions on how his leadership would look like. Was he a political genius? Or a politician gambling with the future of his country?

After his first two months in power, things aren’t looking too good for him. Amid a series of embarrassing defeats, Johnson and his advisers suffered the most stinging rebuke so far when the Supreme Court on Tuesday ruled he had unlawfully suspended Parliament earlier this month.

How did Johnson lose such a key legal battle — and control over Parliament — so quickly?

The lead-up

Mid-June: Reports that Johnson may suspend Parliament to meet Oct. 31 Brexit deadline

Before even becoming prime minister, then-candidate Johnson first circulates the idea of proroguing Parliament to deliver his biggest promise: leaving the European Union on Oct. 31, no matter what.

At the time, Johnson reportedly hopes the move will enable him to push through the no-deal Brexit to which members of Parliament appear opposed, the Times of London reports June 13.

July 24: Johnson becomes prime minister

On Twitter, President Trump congratulates on July 23: “He will be great!”

Aug. 24: Johnson asks attorney general for legal advice on prorogation, or the suspension of parliament

The Observer newspaper reports that Johnson has officially asked Geoffrey Cox, the British attorney general, if a suspension from Sept. 9 onward would be possible. The response appears to be positive — with the caveat that courts may strike down such efforts, according to the Observer.

Aug. 28: Johnson officially asks Queen Elizabeth II to suspend Parliament; the queen approves

The government maintains that the move is routine. But there is an immediate and strong backlash to that claim.

John Bercow, the speaker of the House of Commons, suggests that Johnson’s moves are unconstitutional. While doing so may be customary for most new prime ministers, requesting prorogation just ahead of the scheduled Brexit date makes it “blindingly obvious that the purpose of [suspending Parliament] now would be to stop [MPs] debating Brexit and performing its duty in shaping a course for the country,” Bercow said.

The showdown

Sept. 3: Members of Parliament seize control over agenda

Amid early signs that Johnson may have overstretched the goodwill of lawmakers, 21 Conservative Party members join a rebel alliance to take control of the House of Commons.

Sept. 3 and 4: Defections and ejections, as Parliament members back a “no no-deal” Brexit law

The same day, Johnson loses his parliamentary majority, as one Conservative Party member, Phillip Lee, defects to the Liberal Democrats.

The following day, a majority of Parliament members back a bill designed to prevent a no-deal scenario. In effect, it forces Johnson to request a Brexit extension, if he fails to agree on a deal with the European Union. Previously, Johnson had vowed that Britain would leave the E.U. on Oct. 31 — with or without a deal.

Twenty-one Conservative Parliament members who back the bill are expelled from the parliamentary party — setting up a further showdown between Conservative moderates and hard-line Brexiteers around Johnson. Among the Tory rebels is Nicholas Soames, the grandson of former prime minister Winston Churchill.

Parliament members also reject a call by Johnson for a snap election ahead of Oct. 31, which could have provided Johnson with an opportunity to regain a parliamentary majority. Opposition lawmakers fear that Johnson could exploit such a vote to push through a no-deal Brexit after all.

Sept. 6: High Court of England and Wales rejects legal challenge against suspension of Parliament

Sept. 9 and Sept. 10: Parliament rejects Boris Johnson’s call for an early election a second time; Parliament is suspended

In its final hours before being suspended for what many at this point expect will be five weeks, Parliament’s second rejection of a snap election squashes Johnson’s hopes for a vote ahead of Oct. 31.

Meanwhile, lawmakers raise alarm over concerns that Johnson may ignore their Brexit legislation.

“Johnson himself has refused to say he will comply,” according to my colleagues Griff Witte, Karla Adam and Amanda Ferguson. “There is no modern precedent for a British leader willfully ignoring an act of Parliament. To do so would risk being held in contempt of court — and put in jail.”

As Parliament is suspended, opposition lawmakers shout “Shame!” and attempt to stop Bercow from leaving the House chamber.

Sept. 11: Scottish court rules that Johnson’s suspension of Parliament is unlawful

Though without immediate implications, the ruling is a first indication that the prime minister might be in legally troubled waters. In a particularly worrisome development for Johnson, the three-judge panel finds that he may have misled the queen about why a suspension of Parliament was required at this exact point in time and for the requested length.

Sept. 17: Supreme Court hearing commences

In a sign of the case’s high stakes, the Supreme Court increases the number of judges on the panel from the normal five or seven to 11 — the maximum number possible.

On the final day of the hearing, former Conservative Party prime minister John Major warns that it would be a “remarkable position” if the court concluded that a prime minister faces no legal restrictions when suspending Parliament. The comment pits him — a Brexit critic — against Johnson, despite both politicians’ affiliation with the Conservative Party.

Sept. 24: U.K. Supreme Court rules that suspension of Parliament was “unlawful, void and of no effect”

The unexpectedly straightforward and unanimous ruling is being celebrated by Johnson’s opponents as a victory for parliamentary powers in Britain. The government vows to adhere to the ruling, as some begin to demand Johnson’s resignation.

Though the judges do not explicitly state it, their ruling suggests that the Supreme Court agrees with the Scottish judges who previously asserted that Johnson may have misled the queen.

Read more: