British Chancellor of the Exchequer Rishi Sunak resigned from his post Tuesday in direct protest of Prime Minister Boris Johnson.

Sunak published his resignation as an open letter via social media, stating that he has lost faith in the cabinet and could no longer continue assisting Johnson due to a fundamental difference in vision for the United Kingdom.

British Prime Minister Boris Johnson survived a no-confidence vote last month that could have ousted him from power as discontent with his rule grows amid a fight for his political life. The resignation of such a high-ranking member of Johnson's cabinet has surprised the public as political alliances continue to shuffle.

"The public rightly expect government to be conducted properly, competently and seriously," Sunak wrote. "I recognise this may be my last ministerial job, but I believe these standards are worth fighting for and that is why I am resigning."

PRINCE CHARLES TOLD BY UK LEADERS TO STOP MEDDLING IN POLITICS AMID IMMIGRATION COMMENT BACKLASH: REPORT

The chancellor, third in line of succession after the prime minister and deputy prime minister, is executive of the UK's treasury and one of the four Great Offices of the State. It is widely regarded as one of the most powerful offices in the country.

"To leave ministerial office is a serious matter at any time. For me to step down as Chancellor while the world is suffering the economic consequences of the pandemic, the war in Ukraine and other serious challenges is a decision that I have not taken lightly," Sunak wrote.

Sunak, despite the pointedness of the letter, reiterated his loyalty to Johnson and the prime minister's successes, specifically mentioning Brexit.

"I have been loyal to you. I backed you to become Leader of our Party and encouraged others to do so. I have served as your Chancellor with gratitude that you entrusted me with the stewardship of the nation's economy and finances," the chancellor wrote. "Above all, I have respected the powerful mandate given to you by the British people in 2019 and how under your leadership we broke the Brexit deadlock."

Prime Minister Boris Johnson Chancellor Rishi Sunak British MP parliament

LONDON, ENGLAND - JUNE 07: Britain's Chancellor Rishi Sunak (C) listens as Prime Minister Boris Johnson (L) addresses his Cabinet ahead of the weekly Cabinet meeting in Downing Street on June 07, 2022 in London, England. The Prime Minister survived a confidence vote last night but potentially has long-term problems ahead as he faces rebellion within his party. (Photo by Leon Neal - WPA Pool/Getty Images)

"I am sad to be leaving Government but I have reluctantly come to the conclusion that we cannot continue like this," Sunak closed his letter.

CLICK HERE TO GET THE FOX NEWS APP

Johnson avoided disaster in June, surviving a no-confidence vote.

Conservative members of parliament voted 211-148 in favor of letting Johnson stay in power during a secret ballot in Westminster. 

In an interview with Sky News, Johnson called the vote a "decisive result," despite the fact that 40% of members of his own party split from him. 

Chancellor Rishi Sunak British MP parliament

GREAT AYTON, ENGLAND - JUNE 04: Rishi Sunak MP, Chancellor of the Exchequer tours charity stalls on the village green during the Queen’s Platinum Jubilee celebrations at the Great Ayton Village Fete on June 04, 2022 in Great Ayton, England. The Platinum Jubilee of Elizabeth II is being celebrated from June 2 to June 5, 2022, in the UK and Commonwealth to mark the 70th anniversary of the accession of Queen Elizabeth II on 6 February 1952. (Photo by Ian Forsyth/Getty Images)

The move against Johnson, who has led Britain out of the European Union and through a pandemic, comes as his government faces intense pressure to address increasing energy and food prices. Support among his fellow Conservative lawmakers has weakened as some see him as a liability rather than an asset in elections.