Boris Johnson on Thursday announced his resignation as the leader of the United Kingdom’s Conservative Party but said he will continue to be the prime minister till a new person is elected to the post, reported PTI, citing his office.

The new leader of the Conservative Party, who will take over as the prime minister, is expected to be elected in October.

“I want you to know how sad I am to be giving up the best job in the world,” Johnson said in an address to the nation. “It is clearly now the will of the parliamentary Conservative Party that there should be a new leader of that party and therefore a new prime minister.”

The resignation came after over 50 ministers and aides from Johnson’s Cabinet have quit since Tuesday night beginning with former Minister Rishi Sunak and former Health Secretary Sajid Javid, reported the BBC. In their resignations, Sunak and Javid questioned the government’s competence.

The spate of resignations follows the prime minister’s apology in which he had said that he made a mistake by appointing Conservative MP Chris Pincher as the deputy chief whip in the House of Commons despite sexual misconduct complaints against him.

Pincher had resigned last week from that post after confessing in a letter to Johnson that he had “drank far too much”, embarrassed himself and upset people. The British media reported that Pincher had sexually assaulted two male guests at the Carlton Club in London. Pincher has also been accused of sexual misconduct on several occasions in the past.

Meanwhile, newly-appointed finance minister, Nadhim Zahawi, on Thursday urged Johnson to quit. The prime minister knew “the right thing to do” was to “go now”, he added.

The next general election will be held in 2024, but Johnson can call one if he wants. Since Johnson had survived the confidence vote in June, he could not face another one for a year unless Conservative Party rules are changed. Therefore, Cabinet resignations seemed to be a move to force him to resign.

On June 6, a no-confidence motion was introduced against Johnson after 54 Conservative Party MPs demanded that he resign. They denounced the parties organised by Johnson and his staff members during lockdowns imposed to contain the spread of coronavirus. The controversy has been famously described as the partygate scandal.