AT around 8.40pm on Wednesday, Patrick Harvie and Lorna Slater’s phones lit up with notifications.

They had been texted by the First Minister’s private office inviting them for an early morning meeting at Bute House, his official residence in Edinburgh.  

Rumours had begun swirling earlier that evening about an emergency meeting of Humza Yousaf’s Cabinet.

The Green ministers are said to have assumed this would likely have related either to the First Minister’s position or the ongoing police investigation into the SNP’s finances – something of a magnitude requiring an in-person meeting.

But at the time neither considered likely the prospect they would be sacked the following morning.

Yousaf had spent a large amount of time this week backing the Bute House Agreement in emphatic terms. Their sudden dismissal came like a bolt from the blue.

READ MORE: Scottish Greens to back vote of no confidence in Humza Yousaf

Earlier on Wednesday afternoon, Yousaf had met with SNP Westminster leader Stephen Flynn in Holyrood.

The National: Stephen Flynn

They discussed the future of the SNP’s deal with the Scottish Greens and Flynn (above) is understood to have made the case for ditching them.

Speaking on BBC Scotland on Thursday afternoon, Flynn described the First Minister’s decision as a “very positive thing”.

But it’s believed Flynn was not informed of the First Minister’s decision during their meeting.

He and everyone else outside of Yousaf’s inner circle are thought not to have found out what was happening until Thursday morning.

Harvie (below), a Glasgow MSP, had stayed in the capital on Wednesday night ahead of FMQs.

The National: Patrick Harvie

He cycled over to Charlotte Square, the Georgian quad in Edinburgh’s New Town which houses the First Minister’s official residence.

Slater, a Lothians MSP, walked to get to the early meeting with Yousaf.

By this time, both had read a tweet by the Daily Record’s political editor Paul Hutcheon which suggested that a “rushed Cabinet meeting” at 8.30am could be about the future of the SNP’s deal with the Greens.

READ MORE: Will Humza Yousaf have to resign as First Minister if he loses no-confidence vote?

Harvie and Slater entered the Charlotte Square townhouse to meet with Yousaf and his deputy, Shona Robison (below).

The National: Deputy FM Shona Robison makes a statement to the Scottish Parliament on October 31

The meeting was described as “cool and business-like”, with the First Minister informing both he was terminating the agreement with immediate effect.

Yousaf is said to have been told he was wrong to terminate the agreement, with the Green ministers arguing their members had backed the Bute House Agreement on three occasions and were likely to do so again.

But his mind was made up. He offered them a ministerial car to take them back to the Scottish Parliament. This was declined.

They instead walked the 30-odd minute distance back to Holyrood, blanking questions from a gaggle of journalists gathered outside.

By this time, the news was out. Staff were gathered at the Parliament to hear from the party leaders.

READ MORE: Ash Regan to set out list of demands to back Humza Yousaf in no-confidence vote

Their reactions were described as ranging from angry to baffled. Others complained they had “held their tongues” about members on the right wing of the SNP, such as Fergus Ewing.

They called a press conference in the Garden Lobby of the Scottish Parliament after putting out a stinging media release blasting their former partners in government as “hopeless” and accusing Yousaf of “political cowardice”.

Perhaps unsurprisingly, the party decided they would vote against Yousaf in the confidence vote triggered by the Scottish Conservatives.

Yousaf’s fate now hangs in the balance, with former SNP minister turned Alba MSP Ash Regan (below) holding a decisive vote.

The National: Ash Regan

If she choses to back the First Minister, it will mean him giving major concessions on the trans rights agenda that defined so much of the Greens’ time in government, and taking a more urgent approach on independence.

On the latter, many Yes voters will be happy. But if he gives ground on the former, the rebels in his party switch from the relatively few MSPs aligned with Kate Forbes to the much larger number who back the Scottish Greens’ trans rights policies to the hilt.