Image copyright Reuters Image caption President Trump and First Lady Melania Trump helped distribute meals to victims of flooding in Houston

After the tragedy caused by Hurricane Harvey, Donald Trump managed to oversee a federal emergency with only minimal distraction.

When the president headed to Texas and Louisiana on Saturday, the mood on Air Force One was serious.

A digital clock on the plane was set to Washington and "destination" time, and people wondered what they would see on the ground.

The president wore a jacket and carried a red baseball cap. White House staffers were dressed in jeans and flat shoes and seemed ready for anything. In contrast, First Lady Melania Trump wore snake-skin-style stilettos, later changing into trainers with bright, white laces.

It was the president's second visit in a week - for good reason.

The fourth most populous city in the US, Houston, has been deluged by water. At least 47 people have been killed by Harvey and more than 100,000 homes damaged or destroyed. Yet despite this even bigger disaster was averted.

The president's stewardship of the government effort gave him a chance to show steady leadership. The system functioned relatively well. It was all the more striking, given the chaos that has characterised the White House since the inauguration.

Image copyright Reuters Image caption President Trump met homeless families in relief centres

For the Trump presidency this has been - strangely enough - a peak moment. He's overseen a federal government that has rescued people and kept them safe in temporary shelters and he has personally offered a $1m (£772,000) donation to a charity.

The management of the crisis was a break for his presidency, one that has been characterised not by efficiency but by news about federal investigations, failed legislative efforts and staff shakeups.

For many people in Texas and Louisiana, though, the palace intrigue was irrelevant. They had more pressing issues and were happy he was there.

The president rode in a motorcade through an area of Houston that had been hit by the flood. A brick wall had a hole in it. Plasterboard was piled in backyards and fences were smashed. Carpets were rolled up and left next to a road.

He got out of his vehicle so he could talk to people in the neighbourhood. He was impressed with their efforts to rebuild. He helped, too. He loaded bottles of water and boxes of cleaning supplies on to SUVs and trucks in a Pearland car park, talking with the drivers briefly before they headed out.

Image copyright Getty Images Image caption President Trump loaded supplies on to trucks in Pearland

Before Mr Trump arrived in the car park, I heard a man say he'd tried to get several other people to come and meet the president. They didn't show up. They'd been out saving people, he said, and they were exhausted.

Federal aid workers and troops had been scouring the area looking for flood victims. Black Hawk helicopters swooped in. Ordinary citizens assisted, too, going out in boats to save people. Federal Emergency Management Agency (Fema) officials delivered food and water to people who were stuck in outlying areas.

It's too soon for an in-depth critique of what the authorities did or didn't do well. But early reports showed that the agencies functioned relatively smoothly and that officials co-ordinated their efforts in a thoughtful way.

"You saved a lot of lives," the president told a helicopter pilot he met on Saturday, adding: "I'm proud of you." Then the president wondered aloud how many lives had been spared. But of course it's impossible to know.

When Hurricane Katrina hit New Orleans in 2005, hundreds died. People didn't know how bad things were until it was too late. Or they were poor and didn't have reliable means of transportation and couldn't escape.

With Hurricane Harvey, officials were better at informing people of the dangers and helping them escape.

Mr Trump was in Washington but as president he was in charge of the government's work. His efforts have been, said George Mason University's Francis Buckley, "brilliant", pointing to the way that he called for a national prayer day for the victims, a gesture Mr Buckley described as "Lincoln-esque".

Image copyright Reuters Image caption President Trump was happy to pose for selfies with those he met in Texas

More importantly, said Michael Caputo, who served as a Trump campaign adviser, the president hired competent people. Brock Long, the head of Fema, had worked for years in emergency management before taking the job and knew how to oversee a rescue effort.

Mr Caputo praised the president for choosing him and not "a political crony or an insurance executive".

Brock Long, who travelled with the president on Saturday, seemed preoccupied. He had a lot of work ahead of him.

However, the president's stewardship has not been without criticism.

On the day the hurricane hit, the president announced he would pardon a former Arizona sheriff, Joe Arpaio, who was known for his brutal tactics against immigrants. Mr Trump said he knew that more people would be watching television because of the hurricane so thought it'd be a good time for the announcement.

For some, his remarks seemed callous.

He visited Corpus Christi on Tuesday. "What a crowd!" he said to people. "What a turnout!" It was the kind of thing a candidate might say during a rally - not something you'd expect from a president.

"It's Trump being Trump," said Patrick Miller, a political science professor at the University of Kansas in Lawrence, explaining that the president talks about "his success, his wealth, his poll numbers".

"It's all about him," Mr Miller said.

Image copyright Getty Images Image caption Many are left with ruined homes and ruined possessions after Hurricane Harvey

On Saturday Mr Trump also said things that seemed inappropriate. "Enjoy," he said to a driver who was heading off to help rebuild a devastated part of Texas. When he was helping to serve food, he struggled to put on plastic gloves and joked: "My hands are too big."

Still, on the Trump-o-meter scale, the things he said and did on Saturday - and earlier in the week too - did not seem all that bad.

He seemed to take a genuine interest in the people he met on Saturday. He was also rooting for them. He got back on Air Force One with his fist in the air. He pumped it twice and headed back to Washington.

Follow @Tara_Mckelvey on Twitter