British Prime Minister Boris Johnson announced his resignation Thursday following a series of scandals which questioned his integrity to lead the country.

Johnson, who led Britain out of the European Union in 2020, said he will formally step down as prime minister and Conservative party leader once a successor has been elected by members.

Prime Minister Boris Johnson addresses the nation as he announces his resignation outside 10 Downing Street on July 7, 2022, in London. (Anadolu Agency/Getty/Kyodo)

The prime minister suffered a wave of high-profile resignations of ministers over the last few days after he apologized for issuing a misleading statement relating to a sexual abuse scandal.

The apology followed a wave of controversies about his own conduct in office and several of his colleagues.

Speaking outside his official residence in London, Johnson said, "I'm immensely proud of the achievements of this government, from getting Brexit done, settling our relations with the (European) continent...reclaiming the power for this country to make its own laws in Parliament."

He added, "And let me say to the people of Ukraine, that we in the United Kingdom will continue to back your fight for freedom as long as it takes."

Johnson said given his large majority at the last general election he had desperately tried to convince his colleagues to remain in government over the last few days.

He added he was "sad" to be giving up the "best job in the world."

An official investigation criticized him for a failure of leadership after it was established several parties were held in his official offices that contravened social distancing guidelines during the coronavirus pandemic.

This was despite the prime minister insisting for several months that the rules had been followed at all times.

Johnson was also served a fine for his attendance at one gathering. He later apologized to Parliament.

In June, alarmed by a slump in the opinion polls, his party held a vote of confidence in him, which Johnson narrowly won.

But growing discontent with his conduct and integrity forced matters to come to a head this week.

Johnson, 58, was a journalist before being elected a member of parliament in 2001. He was known for his entertaining appearances on television if, at times, he came across as gaffe-prone and insubstantial.

In 2008, he became mayor of London and oversaw the capital host the Olympics in 2012.

Johnson returned to Parliament in 2015 and in 2016 he led the Leave campaign during the referendum on whether Britain should remain part of the European Union.

He was later appointed foreign secretary but clashed with Prime Minister Theresa May over the direction of Brexit policy. Johnson felt her plan kept Britain too close to the European Union and he favored a harder form of Brexit. He quit his post in 2018.

In July 2019, he was elected Conservative leader and prime minister following May's resignation.

After months of deadlock in parliament he was able to hold a new general election and won a mandate to deliver Brexit. Britain formally withdrew from the European Union on Jan. 31, 2020.

Johnson's government was criticized for the way it initially handled the coronavirus pandemic. In March 2020, the prime minister became so ill with coronavirus he had to be hospitalized and spent several nights in intensive care.