Even though Mrs. May’s de facto deputy, Damian Green, stepped down last month after he was found to have misled the public about pornography found on his work computer, she appeared to be in a stronger position now than at any time since the general election in June.

The prime minister reached an agreement with European Union leaders in December to proceed with talks on trade relations after Britain leaves, a process known as Brexit that is scheduled to take effect in March 2019. The accord was achieved without reawakening acute tensions in the Conservative Party over the extent of the post-Brexit ties between Britain and the bloc.

But the party’s internal truce is fragile, and Mrs. May knows that her position remains vulnerable. Her cabinet has been carefully constructed to balance those, like Mr. Hammond, who want to keep a close economic relationship with the European Union, and those, like Mr. Johnson, who argue for a cleaner break.

A desire to maintain that equilibrium partly explains why the two men remained in their posts, despite criticism of Mr. Johnson’s performance as foreign secretary and calls from hard-line Brexit supporters for Mr. Hammond to be fired.

Mrs. May’s reluctance to risk moving any senior colleagues, and the botched announcement of the new Conservative Party chairman, were described by some commentators in the British news media as the “day of the blunt knives.”

The headline on the website of the right-leaning Daily Telegraph described the reshuffle as “chaotic.” The BBC’s political editor, Laura Kuenssberg, noted the slow pace of announcements and made an ironic reference to Mrs. May’s widely mocked statement, made after modifying plans for social care during last year’s election campaign, that “nothing has changed.”