As the first major natural disaster of his administration played out along the Gulf Coast, leaving millions at risk of deadly winds and flooding from Hurricane Harvey, President Trump was tweeting the unfolding events — live.

“Wow — Now experts are calling Harvey a once in 500 year flood!” Trump marveled in a tweet Sunday morning. “Many people are now saying that this is the worst storm/hurricane they have ever seen.”

“Even experts have said they’ve never seen one like this!” he added in another message.

In an effort to show his engagement, Trump fired off more than a dozen messages to the public on his favorite social media platform after Harvey made landfall on the Texas coast as a Category 4 storm.

He offered praise for the “wonderful coordination” between federal, state and local governments, and lauded the “great talent on the ground.”

Meanwhile, forecasters called for even more catastrophic rainfall. By Sunday afternoon, areas of Texas battled 15-foot floodwater, more than 1,000 people had been rescued, forecasters were warning that more than 50 inches of rain could fall — an astronomical total that probably would break records — and the city of Houston told residents that 911 was already overburdened with calls.

[ FEMA director says Harvey is probably the worst disaster in Texas history ]

The upbeat response from the commander in chief, punctuated by exclamation points, prompted questions about whether he was prematurely declaring the storm response a success, even while many still faced the prospect of deadly danger.

“It’s not premature if you do it the right way,” homeland security adviser Tom Bossert said on CBS’s “Face the Nation,” when asked whether Trump’s tweets were proclaiming success before the worst of the storm had passed. “What Brock Long at FEMA did and myself and the president, we got together and reviewed that carefully and decided on Friday night that the president would issue a major disaster [declaration] before landfall,” he said. Long is the director of the Federal Emergency Management Agency.

“It freed up federal resources,” Bossert added.

Trump has monitored the storm from Camp David, the presidential retreat in Maryland about 70 miles north of the White House to which he traveled with his family Friday afternoon. In Washington, Vice President Pence, Bossert and other aides monitored the storm from the White House while Trump — who donned a “USA”-emblazoned campaign hat and jacket, sans tie — joined the meeting via tele­conference.

“What the president does during a big disaster shows leadership both to the federal employees who are involved, as well as to the public, to gain the cooperation to everyone involved as well as to reassure people,” said Leo Bosner, an emergency management expert who has worked at FEMA for 29 years. “He’s mostly a voice of reassurance and maybe giving people confidence, updating people on what’s going on.

“But he should not be trying to do the job of the FEMA director,” he said.

Trump’s handling of this crisis has been closely watched, even as the White House has faced scrutiny over several announcements Trump made late Friday just as the storm was about to hit. Perhaps the most controversial was his decision to pardon Joe Arpaio, a former sheriff of Arizona’s Maricopa County who was convicted of criminal contempt for not ending his department’s practice of detaining people merely on the suspicion that they were undocumented immigrants.

In the hours before the worst of Harvey’s wrath was felt, Trump received a public warning from Sen. Charles E. Grassley (R-Iowa) about the risks to his presidency of not responding adequately — in tone and substance — to the most powerful storm to make landfall on U.S. shores in 12 years.

“Keep on top of hurricane Harvey,” Grassley wrote, urging Trump not to make the same mistake that President George W. Bush made in his response to Hurricane Katrina in August 2005.

[Harvey causes deadly floods, is set to drop ‘unprecedented’ rain totals in Texas]

Although Trump thanked Grassley for his warning, he seemed to heed it only sporadically.

On Sunday morning, Trump’s first message of the day did not address the rising waters threatening the nation’s fourth-largest city. Instead, he pitched a book written by Milwaukee County Sheriff David Clarke, another supporter and controversial figure. Fifteen minutes later, Trump declared that “continuing rains and flash floods are being dealt with” and reiterated his pledge to travel to Texas when it is possible to do so “without causing disruption.” (Later Sunday, the White House announced that Trump plans to visit the state Tuesday.)

It wasn’t long before Trump had changed subjects again. As his aides and surrogates appeared on national television to address the storm response, Trump announced a political appearance in Missouri, noting that he won the state by “a lot” in the 2016 election. He fired a warning shot at Sen. Claire Mc­Caskill (D-Mo.), whom he identified by her initials, predicting that “Republicans will win” her seat in 2018.

“My god,” remarked Sen. Chris Murphy (D-Conn.), responding to Trump’s message on Twitter. “At this exact moment people are dying in the worst natural disaster of his Presidency & instead of leading he’s attacking Democrats.”

[‘All night of slam, bang, boom,’ then a scramble to assess the hurricane’s damage]

Meanwhile, appearing on ABC ’s “This Week,” Bossert was pressed on other issues, including Trump’s suggestion that he would be willing to shut down the government to secure funding for a wall along the Mexican border. Trump, who often watches his aides’ performances on TV, weighed in, reviving his campaign promise that Mexico would pay for the wall eventually, but not specifying how that would happen.

“With Mexico being one of the highest crime Nations in the world, we must have THE WALL,” Trump wrote. “Mexico will pay for it through reimbursement/other.”

In a seemingly unrelated message, Trump slammed Mexico and Canada for “being very difficult” in negotiations over rethinking the North American Free Trade Agreement.

“May have to terminate?” he wrote in another tweet.

The president’s scattered focus contrasted with the message being delivered on his behalf by Bossert and Long, who collectively appeared on all the Sunday morning public affairs broadcasts to project the Trump administration’s single-minded focus on responding to the hurricane.

“What I have seen inside my agency is, I have got some of the most dedicated people in the entire federal government, great lines of communications with the president,” Long said on CNN’s “State of the Union. “He’s extremely concerned, incredibly engaged.”

Bossert said that Trump participated in a two-hour meeting about the storm Saturday, in addition to a second teleconference briefing Sunday morning. He added that the president and vice president had called him and other officials about the storm response “probably a dozen times each” over the past day.

“The president was actively involved in that and making sure our operations were coordinated, unsticking any disagreements, of which there were none at this stage,” Bossert said. “What I liken this to is a race: We’re off and out of the blocks the right way.

“That’s because of strong preparedness and strong leadership. But now we have to run that race, and then we have to finish that race well,” he added.

Trump has gotten backup from Texas Gov. Greg Abbott (R), who praised the federal government’s efforts to aid his state. Abbott endorsed Trump in the presidential campaign and urged fellow Republicans to do the same. And his friendly posture toward the administration is likely to forestall any messy disagreements between federal and state officials that emergency responses sometimes create.

“I’ll tell you what, we could not be more appreciative of what the federal government has done, from the president on down,” Abbott said on ABC. “Because everything we’ve asked for, they have given us.”