LONDON (AP) — British media say Prime Minister Boris Johnson has agreed to resign, ending an unprecedented political crisis over his future.

Johnson had rebuffed calls by his Cabinet to step down in the wake of ethics scandals. He gave in after more than 40 ministers quit his government and told him to go.

It was not immediately clear Thursday whether Johnson would stay in office while the Conservative Party chooses a new leader, who will replace him as prime minister.

THIS IS A BREAKING NEWS UPDATE. AP’s earlier story follows below.

LONDON (AP) — British Treasury chief Nadhim Zahawi called on Prime Minister Boris Johnson to resign Thursday, just 36 hours after Johnson put him in the job, while another newly appointed Cabinet minister quit her post.

Zahawi said Johnson knew “the right thing to do” was to “go now.”

Zahawi was appointed late Tuesday to replace Rishi Sunak, who resigned saying he could no longer support Johnson after a series of ethics scandals.

Education Secretary Michelle Donelan, who was also appointed on Tuesday following the resignation of her predecessor, announced her resignation Thursday morning.

Johnson has rejected clamors for his resignation, digging in his heels even as dozens of officials quit and previously loyal allies urge him to go after yet another scandal engulfed his leadership.

A group of Johnson’s most trusted Cabinet ministers visited him at his office in Downing Street Wednesday, telling him to stand down after losing the trust of his party. But Johnson instead opted to fight for his political career and fired one of the Cabinet officials, Michael Gove, British media reported.

It is rare for a prime minister to cling on to office in the face of this much pressure from his Cabinet colleagues. The Guardian’s frontpage on Thursday called him “Desperate, deluded.”

As of early Thursday, five Cabinet ministers had quit, including on Thursday Donelan and Northern Ireland Secretary Brandon Lewis who told Johnson in his resignation letter that “we are … past the point of no return. I cannot sacrifice my personal integrity to defend things as they stand now.”

Some 40 junior government officials have also left amid a furor over Johnson’s handling of sexual misconduct allegations against a senior official that was the latest in a long line of issues that have made Conservative lawmakers uncomfortable.

“He’s breached the trust that was put in him. He needs to recognise that he no longer has the moral authority to lead. And for him, it’s over,” Scottish National Party leader Ian Blackford told The Associated Press.

Johnson cannot continue because his government has not even got ministers to attend to regular Parliament business after so many resigned, Blackford added.

Johnson’s future remains extremely uncertain. So far, most Cabinet officials have remained in their positions but a mass walkout by the Cabinet could force his hand if that leaves him unable to run a functioning government.

If Johnson still refuses to resign, the Conservatives could oust him by potentially triggering a new no-confidence vote.

Johnson survived such a vote on Jun. 6 — though his authority took a beating because even then 41% of his lawmakers voted to get rid of him. Under current party rules, a year must pass before another formal leadership challenge can take place.

But an influential group of Conservative lawmakers known as the 1922 Committee has the power to rewrite the rules to allow a fresh confidence vote within a shorter timeframe. The committee could decide as early as Monday whether to do that.

Johnson, 58, is known for his knack for wiggling out of tight spots. He has remained in power despite allegations that he was too close to party donors, that he protected supporters from bullying and corruption allegations, and that he misled Parliament and was dishonest to the public about government office parties that broke pandemic lockdown rules.

But recent disclosures that Johnson knew about sexual misconduct allegations against Chris Pincher, a Conservative lawmaker, before he promoted the man to a senior position pushed the prime minister to the brink.

Last week, Pincher resigned as deputy chief whip after complaints he groped two men at a private club. That triggered a series of reports about past allegations leveled against Pincher — and shifting explanations from the government about what Johnson knew when he tapped him for a senior job enforcing party discipline.

Health Secretary Sajid Javid and Treasury chief Rishi Sunak resigned within minutes of each other Wednesday over the scandal. The two Cabinet heavyweights were responsible for tackling two of the biggest issues facing Britain — the cost-of-living crisis and COVID-19.

Javid captured the mood of many lawmakers when he said Johnson’s actions threaten to undermine the integrity of the Conservative Party and the British government.

“At some point we have to conclude that enough is enough,” he told fellow lawmakers Wednesday. “I believe that point is now.”

The resignations of some 40 junior ministers and ministerial aides followed on Tuesday and Wednesday. A third Cabinet official, Welsh Secretary Simon Hart, quit late Wednesday, saying “we have passed the point” where it’s possible to “turn the ship around,” and Lewis left on Thursday morning.

Many of Johnson’s fellow Conservatives were concerned that he no longer had the moral authority to govern at a time when difficult decisions are needed to address soaring food and energy prices, rising COVID-19 infections and the war in Ukraine. Others worry that he may now be a liability at the ballot box.

But Johnson brushed off the attacks, citing the mandate that voters gave him when he came to power in 2019.

“Frankly … the job of the prime minister in difficult circumstances, when he’s been handed a colossal mandate, is to keep going,’’ Johnson told detractors in Parliament Wednesday. “And that’s what I’m going to do.”

___