Javid had been widely expected to keep his job, the second most powerful in the government, as Johnson fired some cabinet members and promoted more junior ministers to top jobs.
Seen smiling as he entered the prime minister’s 10 Downing Street office on Thursday morning to meet Johnson, a spokesman confirmed soon after that Javid had quit.
The government announced that he would be replaced by Rishi Sunak, who was previously a deputy to Javid at the Treasury.
Javid’s resignation follows reports he had clashed with Johnson’s powerful adviser Dominic Cummings, a self-styled political disruptor who is mistrusted by many lawmakers and officials.
Javid had been due to deliver his annual budget in less than a month. His resignation shakes the government as it faces the challenge of negotiating a new relationship with the 27-nation European Union by the end of this year.
Britain’s Press Association news agency reported that Javid had quit after being told to fire all his aides and replace them with staff appointed by the prime minister’s office.
Paul Dales, chief UK economist at Capital Economic, said Javid had appeared reluctant to increase public borrowing to fund higher spending. He added that Javid’s departure should allow the government to push through even bigger increases in public investment and perhaps resuscitate tax cuts that previously looked dead in the water.
The resignation was a curveball in a cabinet shake-up that was intended to tighten Johnson’s grip on government after winning a big parliamentary majority in December’s election. That victory allowed Johnson to take Britain out of the European Union last month, delivering on his key election promise.
Now his Conservative administration faces the even bigger challenge of negotiating a new trading relationship with the EU while also seeking trade deals with the United States and other countries.
Britain and the EU are aiming to have a deal covering trade, security and other areas in place by the time a post-Brexit transition period ends on Dec 31.
So far, the two sides are far apart in their demands. And even with a deal, the UK faces a huge adjustment when decades of seamless trade and travel with the EU end at the start of 2021.
Johnson had intended to keep the most senior ministers in their jobs. His office said Foreign Secretary Dominic Raab, Home Secretary Priti Patel, Justice Secretary Robert Buckland and Cabinet Office Minister Michael Gove were all staying in their current posts.
Several high-profile women in Johnson’s government, including Business Secretary Andrea Leadsom, Environment Secretary Theresa Villiers and Housing Minister Esther McVey all said they had been fired. Johnson also sacked Northern Ireland Secretary Julian Smith in another surprise move. Smith had been widely praised for helping to end the political deadlock that left Northern Ireland without a regional government and assembly for three years.
After pressure from the British and Irish governments, the main Irish nationalist and British unionist power-sharing parties returned to work last month.
As well as reworking his Cabinet, Johnson appointed a new leader for the United Nations’ climate change conference that Britain is due to host later this year. The summit, known as the 26th Conference of the Parties, or COP26, is scheduled to be held in Glasgow in November.
Planning for that has got off to a rocky start, with Johnson last week firing Claire O’Neill, a former British government minister appointed last year to head up the event.
The government said Thursday that Alok Sharma, previously in charge of international development, would become business secretary and also take charge of COP26.