Boris Johnson has moved to seize control over the Treasury in an unexpectedly brutal reshuffle that forced out his chancellor, Sajid Javid, and paves the way for a post-Brexit spending bonanza at the budget.

Johnson staged the power grab over No 11 by issuing an ultimatum to his chancellor to fire all his advisers – a move that Javid later said “no self-respecting minister” could accept.

In his place, the prime minister appointed Rishi Sunak, Javid’s ultra-loyalist deputy, who agreed to accept a pooled unit of advisers shared between No 10 and No 11.

Javid’s exit comes after months of tensions between his team and Johnson’s top adviser, Dominic Cummings, who had wanted more control over economic policy and spending plans.

It marked the most dramatic moment in a ruthless reorganisation of the cabinet in which ardent Brexiters were brought in at the cost of ministers perceived as being disloyal or disobedient – silencing doubts over Cummings’s continuing importance to the Johnson project.

The prime minister’s changes – which saw even successful ministers who have stepped out of line, including the Northern Ireland secretary, Julian Smith, and the attorney general, Geoffrey Cox, replaced – came despite earlier briefing that the reshuffle would be limited in scope and ambition.

Facebook Twitter Pinterest Boris Johnson and Dominic Cummings are thought to want greater power over the Cabinet Office and Treasury before making deep changes within Whitehall. Photograph: Peter Summers/Getty Images

Several Whitehall sources told the Guardian that Johnson and Cummings want No 10 to consolidate its grip over the Treasury and Cabinet Office in preparation for wider machinery of government changes they want to make in the next year.

In the short term, the reshuffle is likely to mark a shift towards greater spending and possibly tax rises at the budget, which is due to take place on 11 March if it is not delayed. Earlier this week, the idea of a mansion tax was floated, but some Conservative MPs believe a council tax revamp is more likely to be on the cards.

The departure of the chancellor weeks before such a major fiscal event left the Treasury in shock and No 10 unable to confirm the budget would definitely go ahead on that day.

Johnson’s spokesman was also evasive about whether Javid’s fiscal rules promising to balance the books on day-to-day spending by the middle of the parliament will remain in place, although he acknowledged they were part of the Tory election manifesto.

Sajid Javid's exit leaves Boris Johnson in control of Treasury Read more

Speaking from outside his house, Javid told reporters it was the prime minister himself who had tried to clear out his advisers, not Cummings.

“I was unable to accept those conditions,” he said. “I don’t believe any self-respecting minister would accept such conditions, so therefore I felt the best thing to do was to go.”

Downing Street sources insisted Johnson had sincerely wanted Javid to stay on and suggested the “spad unit” was a way of minimising friction between Nos 10 and 11, and avoiding the kind of tensions that hampered the Tony Blair government.

“You either go the Blair and Brown way, or you do the George and Dave way,” said a source – referring to the close relationship between George Osborne and David Cameron, who shared an office in opposition, and took the same approach into government in 2010.

No 10 officials were particularly irritated by what they regarded as a ham-fisted briefing about the HS2 decision by Javid’s team, that appeared to play up the chancellor’s role in approving the project, and pre-empted an official announcement by the prime minister.

It is understood Javid was told most of his advisers would not be considered for roles in the new team, because No 10 believed they had not served him well, and had given him poor advice.

Robert Buckland, the justice secretary, was also told he must fire one of his aides if he wanted to keep his job. Peter Cardwell, Buckland’s special adviser, confirmed that he had been sacked at the behest of No 10, with his boss delivering the news that his services would no longer be required without a specific explanation.

However, Javid took the decision to stand by his five aides, after previously enduring the humiliation of having Cummings fire his former press secretary, Sonia Khan, last year on suspicion of leaking without informing him first. Khan denied leaking and was escorted out of No 10 after refusing to hand over her phone to Cummings.

Javid’s resignation letter to Johnson contained a number of parting shots at the No 10 operation, including a veiled warning to Johnson about the influence of Cummings. He issued a plea for the Treasury to retain its “credibility”, and advised the prime minister that leaders needed to have “trusted teams that reflect the character and integrity that you would wish to be associated with”.

Javid also stressed the need for prime ministers to be able to receive “candid and frank advice” in a suggestion that some of Johnson’s new loyalist appointments might not be capable of doing that.

The number of women in cabinet fell from seven to six, out of 22, with the Lib Dems saying it was “unbelievable that Boris Johnson has managed to find a way to make his cabinet even more male-dominated”.

The number of black and minority ethnic cabinet ministers dropped from four to three, out of 22, and the two ministers from a Muslim background – Javid and Nusrat Ghani – both left the government. The Sutton Trust found that 62% of Johnson’s cabinet went to fee-paying schools, against 64% previously, with 31% going to fee-paying school and then Oxbridge.

Johnson cleared out a raft of other cabinet ministers considered insufficiently obedient, including Julian Smith as Northern Ireland secretary, Andrea Leadsom as business secretary and Geoffrey Cox as attorney general. Smith had angered No 10 over his Brexit stance and deal to allow soldiers to be prosecuted for crimes during the Troubles, while Cox was considered not enough of a team player. Leadsom had caused annoyance by writing a piece for the Telegraph stressing to guard against a “male-dominated environment” in the workplace.

Several prominent Brexiters were rewarded with top jobs. Suella Braverman got the role of attorney general, after criticising judges for becoming too political, and Anne-Marie Trevelyan, a sceptic about the value of foreign aid, became development secretary.

Alok Sharma, considered a Johnson ally, was given the job of business secretary and Cop26 president in charge of climate negotiations for the upcoming summit, despite having little experience in the area.

Others to lose their jobs included Theresa Villiers, who was replaced as environment secretary by George Eustice, a supporter of Michael Gove. Oliver Dowden, a former adviser to David Cameron, was made culture secretary, replacing Nicky Morgan, who was only in place temporarily as a peer after stepping down as an MP at the election.

Esther McVey was replaced as housing minister by Christopher Pincher, a former deputy chief whip, who becomes the tenth person to hold that brief in 10 years.

The job of chief secretary to the Treasury, who will play a key role in the upcoming spending review, went to the former Brexit secretary Stephen Barclay.

James Cleverly was removed from his job as Tory chairman and put in the Foreign Office, with his old job given to the relatively unknown Amanda Milling – a longtime backer of Johnson who was onboard with his first leadership campaign.

Apart from the chancellor, all the great offices of state remained in post and Ben Wallace clung on as defence secretary despite having been rumoured to be in line to lose his job.