White House homeland security adviser Tom Bossert speaks during the daily news briefing at the White House on Monday. (Carolyn Kaster/AP)

Hurricane Harvey was just beginning to unleash its full fury on Houston when President Trump took to Twitter to praise his new emergency management chief, Brock Long: "You are doing a great job — the world is watching!"

To Mark Merritt, a Federal Emergency Management Agency official in the Clinton administration, the tweet seemed premature. “I was having a ‘Brownie’ flashback,” said Merritt, referring to Michael Brown, the FEMA administrator lauded by President George W. Bush for doing a “heck of a job” during Hurricane Katrina in 2005.

In Trump's case, however, the social media "attaboy" proved more prescient. Facing off against a pair of historic storms — first Harvey in Texas and Louisiana, then Hurricane Irma through the U.S. Virgin Islands and Florida — Trump's administration has earned bipartisan praise for coordinating the federal response with state and local officials, avoiding the type of catastrophe that marked the Bush administration's response to Katrina, a storm that killed more than 1,800 people.

Harvey and Irma wreaked widespread destruction that will take years and billions of dollars to recover from, and the death toll from the two storms, including in the Caribbean, has reached over 100, according to authorities. Experts caution that the affected communities will need consistent support and attention even as the dramatic images of destroyed buildings and flooded neighborhoods recede from public view.

But for a Trump administration whose first eight months has been marked by internecine squabbles and a lack of legislative accomplishments, the initial competence in managing the storms represented a relief — and a rare chance to take credit. Trump is slated to visit Florida on Thursday to view Irma’s aftermath, officials said.

President Trump and first lady Melania Trump meet people affected by Hurricane Harvey during a visit to the NRG Center in Houston on Sept. 2. (Susan Walsh/AP)

“While I’m preaching caution to make sure people understand that this is an ongoing effort and that there’s still going to be long, painful days ahead, I am doubling down on my assertion that this is the best-integrated, full-scale response effort in our nation’s history,” Thomas Bossert, Trump’s homeland security adviser, told reporters at the White House on Monday.

Several major policy questions have been raised in the wake of the storms, including whether Trump will reconsider his proposals to slash FEMA’s grant programs and his administration’s hostility to regulations aimed at protecting the environment. And in the early days of Harvey, Trump often focused on the performance of his team and the scale of the storm rather than the plight of victims.

But overall, emergency management veterans said, Trump and his team deserve acknowledgment for getting through the first phase of the crisis in a way that inspired public confidence.

At the request of Texas Gov. Greg Abbott (R), the president signed a declaration, before the storm made landfall, to authorize disaster relief funds available to individuals. Kenneth E. Mapp, governor of the U.S. Virgin Islands, said he spoke Monday with Trump, who expressed concern and said he would try to visit the islands.

And Trump is working with Congress to authorize $7.9 billion in emergency funds for Harvey relief, the first of what is expected to be several tranches of federal aid.

“President Trump, for all the negatives we’ve heard about him, has done the right thing: He picked a great team and let them do their job,” said Merritt, now a private consultant who has worked previously with Long, Alabama’s former emergency management director.

President Trump greets military personnel at Houston’s Ellington Field on Sept. 2 before departing for Louisiana to continue a tour of areas affected by Hurricane Harvey. (Nicholas Kamm/AFP/Getty Images)

Despite the early tweet to Long, who was confirmed to the FEMA job in June, Trump “did not interfere, and even his Twitter did not interfere,” Merritt said. “We didn’t have a Twitter setback.”

Bossert, who briefed Trump on the progress of the storms, has significant experience, having worked in FEMA’s policy shop during the Bush administration.

White House Chief of Staff John F. Kelly, who headed the Department of Homeland Security for five months, also brought a familiarity with FEMA and a close working relationship with acting DHS secretary Elaine Duke. Two of Kelly’s deputies, Kirstjen Nielsen and Joseph Hagin, worked on hurricane relief efforts in the Bush administration.

And Long served as the hurricane program manager at FEMA from 2001 to 2006. Former Bush aides recalled a video conference on Air Force One during Katrina when Hagin was with the president on the plane and Long was on the other end at the agency.

“The people who are there have lived through painful experiences,” said Steve Atkiss, a former operations aide to Bush. “They are acutely attuned to what could go wrong, and having them in place prevents you from stepping on a lot of land mines.”

Administration officials said that on several occasions, Trump picked up the phone and, unbeknown to aides, called Texas’s Abbott and Louisiana Gov. John Bel Edwards (D) to ask whether they needed anything.

Trump has developed a reputation as a chief executive uninterested in delving into the minutiae of policy. But aides said the president was attentive and asked detailed questions in the numerous briefings from Bossert.

Trump led several conference calls that included agency officials, spoke with Cabinet members ahead of Harvey and convened a full Cabinet meeting at the presidential retreat at Camp David last weekend as Irma made landfall in Florida.

“His basic direction was to do the right thing and do it in a timely fashion,” said Doug Fears, the senior director of resilience policy at the National Security Council.

Trump faced criticism from some Democrats and members of the media when — during the first of two visits to Texas in the wake of Harvey — he praised the crowd size during impromptu remarks to supporters outside a firehouse in Corpus Christi. Some also faulted the president for a seeming lack of empathy for victims as he marveled at the sheer power and size of the storms — calling them the "largest ever recorded."

At the same time, however, the president issued several Twitter messages imploring the public to heed the directions of the governors and other local officials, particularly leading up to Irma’s landfall.

“It’s rare that Trump lets someone else do the talking and control the message,” said one former Bush official who spoke on the condition of anonymity to speak frankly about Trump’s response. “He has been on message when he’s been speaking about it and has not tried to steal the spotlight.”