WASHINGTON — The one-two punch of Hurricanes Harvey and Irma have thrust President Trump into one of the most perilous roles of any modern president: That of responder-in-chief.

Disasters — both natural and man-made — have become critical tests of presidential leadership. If the crisis response is perceived as quick and efficient, the president gets the credit. If it's slow and bureaucratic, the president can pay a political price.

And by most accounts, the Trump administration has handled the double-barreled hurricanes competently — if not always empathetically.

"I think he's done fine. He's prepared disaster declarations. He's stayed out of the way of the response, and most of all he's appointed a professional FEMA director," said Patrick Roberts, who studies the federal response to disasters at Virginia Tech. "He has also used the presidential megaphone to tell people that this is a serious storm and pay attention and that's one of the most important thing a president can do in terms of messaging."

Trump has repeatedly used his Twitter account to call Irma a storm of "epic proportion," and to tell people to heed instructions of state and local officials to evacuate.

But his first trip to visit the damage caused by Hurricane Harvey was largely seen as lacking the overt displays of compassion shown by some of his predecessors.

The Tuesday after the weekend storm, Trump visited a Corpus Christi fire station, waved the flag of Texas, and toured the state's emergency operations center in Austin — all without getting his feet wet or meeting with victims of the disaster. Nonetheless, he later tweeted that he had witnessed "first hand the horror and devastation" of Harvey.

Energy Secretary Rick Perry later defended Trump, saying the president wanted to go to Houston earlier – but was advised to stay out of the way of the search and rescue response.

But cable pundits seized on the moment. "Startlingly, he did not utter one syllable about those who have lost their lives, their homes or businesses in the floods that are still swelling over southeast Texas," said David Axelrod, a former aide to President Barack Obama, on CNN.

So Trump returned to Houston four days later — this time visiting a shelter, shaking hands and hugging children. "We’re very happy with the way everything is going... There’s a lot of love," Trump said. "As tough as this was, it’s been a wonderful thing, I think even for the country to watch it and for the world to watch. It’s been beautiful.”

Trump hasn't yet announced a trip to Florida in the aftermath of Irma, but spent most of the weekend at Camp David huddling with emergency officials and said Sunday he plans to visit "very soon."

It wasn't always this way. For most of American history, communication and travel made it impossible for presidents to respond to disasters in real time, and Congress was seen as primarily responsible for coming to the aid of states, passing separate bills for each disaster.

That changed with President Lyndon Johnson, who visited the aftermath of Hurricane Betsy in 1965. His response was part calculated politics — he needed the support of the Louisiana delegation to pass his Great Society programs — but also appeared to stem from genuine personal concern. Johnson even met with victims outside the view of the press.

Still, the expectation that presidents needed to be strong leaders during natural disasters until 1992, when Hurricane Andrew hit Florida three months before a presidential election. President George H.W. Bush's response was largely seen as slow and ineffective.

"Where in the hell is the cavalry on this one?" exclaimed Dade County official Kate Hale as hungry and thirsty storm victims mobbed the few relief trucks to arrive. "For God's sake, where are they?"

"I'm not going to participate in the blame game," Bush said from the Rose Garden. "It doesn't do any good to go into 'Who shot John?'"

Bush narrowly won Florida — a state he won handily four years earlier — but lost the election.

"Hurricane Andrew in 1992 was arguably the start of what came to be known at that time as 'CNN Syndrome,'" said Gareth Davies, an Oxford University historian who has traced the history of presidential responses to disasters.

Bush was under pressure not just to act, but to be seen acting — and social media has only amplified that pressure for Trump, Davies said.

Indeed, each of the last four presidents have seen their political fates determined, at least in part, by how they responded to disasters.

President Clinton cemented his reputation as the comforter-in-chief when he went to Oklahoma City and delivered a pastoral speech after domestic terrorists blew up a federal building, killing 168 people.

President George W. Bush generally received high marks in the aftermath of the terrorist attacks of 2001. But his handling of Hurricane Katrina was so bad that "Katrina moment" has already become a sort of linguistic shorthand for an embarrassing presidential mismanagement.

And if President Barack Obama had a Katrina moment, it might have been the federal response to the Deepwater Horizon oil spill. A USA TODAY/Gallup poll taken two months after the spill found that 53% of Americans rated Obama's performance "poor" or "very poor," and 71% said he hadn't been tough enough on oil company British Petroleum.

When floods hit Louisiana last year, Trump was quick to criticize Obama for not cutting his vacation short. "President Obama should have gone to Louisiana days ago, instead of golfing. Too little, too late!" he tweeted.

After Katrina, reforms to the Federal Emergency Management Agency made it easier for presidents to get out in front of a major storm. FEMA now pre-positions emergency supplies ahead of a major hurricane, and presidents have emergency declarations written up ahead of time to allow aid to be distributed before the first wind gust.

Trump's Homeland security adviser, Tom Bossert, said Trump has been actively involved, but that most issues are resolved before they get to his desk.

Speaking on Face the Nation during Hurricane Harvey, Bossert described the president's role as "making sure our operations were coordinated, unsticking any disagreements — of which there were none at this stage.”

So the only thing left to do is for the president to be seen as the "responder-in-chief."

"Disasters demonstrate a very palpable connection between the local citizens and the federal government," said Virginia Tech's Roberts. "It's become expected that the president will go to the scene themselves and roll up their sleeves and get their hands dirty and show that they are themselves helping."