Staffers at the Department of Homeland Security were at work on the response to Hurricane Dorian this week when their boss, acting secretary Kevin McAleenan, popped up on cable television news channels sitting next to President Trump in the Oval Office.

McAleenan’s briefing, with other administration officials, on the storm’s progress was the kind of emergency briefing that past presidents had assembled to demonstrate their readiness and instill public confidence ahead of a looming natural disaster.

But the ensuing media conflagration over “Sharpie-gate” — in which Trump brandished a doctored weather map to try to prove himself right over an erroneous claim that the storm had been headed toward Alabama as late as last weekend — was not something anyone had expected. And for staffers at federal agencies that have led the administration’s response to Dorian, a storm that has wreaked havoc on the Bahamas and battered the coast in the Carolinas, Trump’s involvement has been a mixed blessing.

President Trump on Sept. 4 held up a map of Hurricane Dorian featuring an apparent Sharpie-drawn circle to falsely extend its projected path. (The Washington Post)

The president has been eager for updates on the hurricane’s path, they said, and the White House was responsive to requests from agencies as they planned an emergency response in Florida, the Carolinas and Puerto Rico, a U.S. territory where the administration’s response to Hurricane Maria in 2017 was widely criticized as contributing to a slow recovery and a high number of deaths.

Yet Trump’s personal involvement as the megaphone for the government’s public messaging has also served as a distraction, according to agency staffers and independent hurricane response experts who are working with the administration.

After canceling a trip to Poland to stay in the Washington area to monitor the storm, Trump has flown on Marine One from Camp David to play golf at his private club in Sterling, Va.; feuded with London Mayor Sadiq Khan, who criticized the golfing; mocked Puerto Rico as “one of the most corrupt places on earth”; and spent days, and numerous tweets, defending his stance that Alabama had been in the storm’s path.

The Post’s Philip Bump analyzes President Trump’s trend of undercutting his policy and political agenda via seemingly impulsive reactions to the day’s news. (The Washington Post)

Trump and his administration continued their Alabama crusade Friday, as the National Oceanic and Atmospheric Administration issued an unsigned statement siding with Trump over its own scientists on whether the state was at risk of a direct hit from Dorian. Alabama was never in the “cone of uncertainty” used in tracking storms, and the National Hurricane Center never mentioned the state in its documents.

David Lapan, who served as a DHS spokesman until October 2017, said Trump’s willingness to use his large social media presence — with 64 million Twitter followers — to amplify warnings and guidance from federal agencies can be viewed as a positive. The president has retweeted scores of messages from the Hurricane Center, the National Weather Service and the Coast Guard, as well as from state and municipal government agencies and local news outlets.

“When he gets involved in creating his own messaging, getting the facts wrong in the process, that’s where it’s damaging,” said Lapan, now a vice president at the Bipartisan Policy Center.

Lapan — who was involved in DHS’s responses to Hurricanes Maria, Irma and Harvey in 2017 — said Trump’s actions could be confusing for the federal workforce, such as when he asserted that the storm was threatening Alabama days after the path had definitively turned away from the state, according to government experts.

“You’re not really sure as part of the workforce: ‘Is this guidance? Are we supposed to be carrying these things out?’ ” Lapan said. “What people end up doing is tuning that out or saying: ‘I’m only going to listen to people who are my direct bosses. If the president says something, I will wait to hear it from my chain of command.’ ”

Behind the scenes, Trump has been regularly briefed on the storm, according to White House aides and staffers in the federal agencies. The former reality-television star has shown particular interest in superlatives, asking whether storms are the “biggest” or the “strongest” in recent years. He publicly marveled at one point that the storm was a Category 5, which he insisted he had never heard of before.

In fact, four other storms of that size have threatened the United States since he took office.

Trump has been “very engaged,” said one administration official from a federal agency who spoke on the condition of anonymity to discuss internal deliberations. Trump has been in personal contact with agency leaders, this official said, and the president seemed at times to be “taking a daily, and an almost hourly, interest in the hurricane.”

One former U.S. government official who served in a previous presidential administration and has helped in Puerto Rico’s recovery efforts said he was impressed with the Trump administration’s preparations on the island ahead of Dorian.

The Federal Emergency Management Agency was “really forward-leaning,” said this person, who spoke on the condition of anonymity because of the sensitivity of the situation. “I felt they were in a pretty good place to deal with a storm that was insane before changing directions. I’m not a Trump fan, but there’s nothing I could criticize about what they did in Puerto Rico.”

Yet this person said Trump’s role should be “cheerleader in chief” for the federal workforce. “His job is to instill confidence in the system,” he said. Reporters “should be covering whether we have water or have done the right thing with evacuations,” he said. “But you’re focusing on why he’s playing golf or Sharpie-gate. It’s an absolute distraction, and it hurts the response.”

White House staffers privately expressed frustration that the media made a big story out of the altered weather map and Trump’s comments on Alabama. But they acknowledged that Trump fueled it by fixating on the issue and repeatedly raising it with administration officials, reporters and outside advisers.

Trump has been preoccupied with other issues this week as well. He complained last weekend to advisers about his “phony” poll numbers and unfair coverage on Fox News — in his mind, MSNBC and CNN are against him so Fox should be for him.

Making matters more uncertain, Trump is operating with “acting” leaders — at DHS with McAleenan, who had been head of Customs and Border Protection until being promoted in the spring, and at FEMA with Peter Gaynor, who has served as acting administrator since last October.

Lapan, the former DHS spokesman, said he sensed that Trump asserted himself in a more forceful public role as Dorian approached than he had during the hurricanes in 2017, when then-FEMA Administrator William “Brock” Long, who had been confirmed by the Senate, marshaled the response.

“I wonder if the president felt more compelled to insert himself,” Lapan said. “Is he more emboldened to step into those circumstances than he might have been?”