Finally, late Monday afternoon, the White House’s flag was lowered back to half-staff. Trump also issued a proclamation calling for flags to remain lowered until the day McCain is buried. He said in a statement that he had asked Vice President Mike Pence to speak at a Capitol ceremony honoring McCain, and would dispatch his chief of staff, John Kelly; defense secretary, James Mattis; and national-security adviser, John Bolton, to attend McCain’s funeral at the Washington National Cathedral. (Left unsaid was the fact that the president was conspicuously not invited to the funeral.)

Yet even there, Trump couldn’t resist a dig at McCain. His statement began, “Despite our differences on policy and politics, I respect Senator John McCain’s service to our country.” This kind of thing is so typical for Trump that it’s becoming difficult to remember that such injections of raw partisanship into solemn occasions used to be unthinkable. Consider the statements that Barack Obama made after two prominent Republican senators, Ted Stevens and Howard Baker, died while he was in office; neither mentioned political disagreements. Now consider that those men were each of a different party than Obama—unlike McCain and Trump, who nominally shared a GOP affiliation.

The impulse to foreground division is typical of Trump. So is the chaotic path that led to Monday’s long-awaited statement. The discarded White House comment, the icy tweet, the yo-yoing of the flag—these all suggest an administration that is proceeding without a clear vision, and that is caught in a tug-of-war between the president’s bad attitude and his advisers’ better judgment. And, of course, the impulse to snub McCain, even at the moment of his death and in the face of presidential tradition, speaks to Trump’s vast pettiness; this is the rare occasion when nearly all of the political world is united in mourning.

The lionization of McCain is a little much for some observers, especially on the left. Trump would not be wrong to believe that the praise for McCain is, at least in part, targeted at him, meant both to draw a contrast with the president and to pour some salt into the wounds left by McCain torpedoing the Obamacare repeal. Trump craves elite approval, and so elites weeping and gnashing their teeth is designed, and succeeds, as a way to enrage him.

This is especially true for the press, which loved McCain (who was always ready with a good quote) and has a fractious relationship with Trump. Reporters who otherwise consider themselves objective, non-opinionated journalists have been willing to speak in gushingly reverent terms about McCain. Yet it appears the unremitting criticism from the press Monday on the flag issue finally forced the White House to react.

From trade deals to military deployments, the president has a consistent pattern: Talk a big game, then back down.