Donald Trump told Hurricane Harvey survivors to “have a good time” as he visited an emergency centre where hundreds of Texans were sheltering after losing their homes and relatives in the devastating storm.

The President struck an upbeat note as he posed for selfies, high-fived children and joked about his “big hands” during a trip to the NRG Center in Houston, which is being used to temporarily house those affected by the natural disaster.

Mr Trump’s visit on Saturday came after a week of historic flooding in the area that killed at least 40 people, displaced tens of thousands and left swaths of the city underwater.

Emergency workers and volunteers in the Houston area were still dealing with the destruction and burying the dead as the US leader smiled for television cameras and told reporters he had seen “a lot of happiness” after the hurricane.

Nearby, the city of Beaumont, Texas, was struggling to restore its drinking water.

Firefighters in Crosby, outside of Houston, were warily eyeing the Arkema chemical plant, twice the scene of explosions.

Floodwaters had inundated at least seven highly contaminated toxic waste sites in the Houston area, raising concerns about creeping pollution.

Mr Trump was criticised for having minimal interaction with residents and offering few expressions of concern during a trip to Texas on Thursday.

Donald Trump's international Presidential trips Show all 22 1 /22 Donald Trump's international Presidential trips Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump AFP/Getty Images Donald Trump's international Presidential trips French President Emmanuel Macron and US President Donald Trump talk as they leave the Army Museum at Les Invalides in Paris AFP/Getty Images Donald Trump's international Presidential trips German Chancellor Angela Merkel and US President Donald Trump arrive for the group photo at the G7 Taormina summit on the island of Sicily in May 2017 Getty Images Donald Trump's international Presidential trips Mr Trump was pressed on the subject at the G7 summit in Italy Getty Donald Trump's international Presidential trips US President Donald Trump gives a speeech at the Warsaw Uprising Monument on Krasinski Square Getty Donald Trump's international Presidential trips US President Donald Trump and Britain's Prime Minister Theresa May during a ceremony at the NATO headquarters before the start of a summit in Brussels, Belgium Reuters Donald Trump's international Presidential trips Montenegro's Prime Minister Dusko Markovic is seen to the right of Donald Trump at a Nato summit in Brussels REUTERS Donald Trump's international Presidential trips Pope Francis meeting with US President Donald J. Trump EPA Donald Trump's international Presidential trips Pope Francis poses with US President Donald Trump and First Lady Melania Trump AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump arrives at Palazzo del Quirinale ahead of the meeting with Italian President Sergio Mattarella Ufficio Stampa Presidenza della via Getty Donald Trump's international Presidential trips US President Donald Trump is seen during a joint press conference with the Palestinian leader at the presidential palace in the West Bank city of Bethlehem AFP/Getty Images Donald Trump's international Presidential trips Palestinian president Mahmoud Abbas meets US President Donald Trump PPO via Getty Donald Trump's international Presidential trips Israeli Prime Minister Benjamin Netanyahu speaks with US President Donald Trump prior to the President's departure GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump and Israel's Prime Minister Benjamin Netanyahu shake hands after delivering a speech at the Israel Museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and First Lady Melania Trump lay a wreath in the Hall of Remembrance as White House senior advisor Jared Kushner and Ivanka Trump watch on during a visit to the Yad Vashem Holocaust Memorial museum AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump visit to Yad Vashem Holocaust museum in Jerusalem accompanied by Prime Minister Benjamin Netanyahu GPO via Getty Images Donald Trump's international Presidential trips US President Donald Trump takes his seat before his speech to the Arab Islamic American Summit in Riyadh in Saudi Arabia Reuters Donald Trump's international Presidential trips Saudi Arabia's King Salman bin Abdulaziz al-Saud, US President Donald Trump and US First Lady Melania Trump look at a display of Saudi modern art at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips US President Donald Trump and Saudi Arabia's King Salman bin Abdulaziz al-Saud take part in a signing ceremony at the Saudi Royal Court in Riyadh AFP/Getty Images Donald Trump's international Presidential trips King Salman presents Donald Trump with The Collar of Abdulaziz al-Saud Medal at the Royal Court Palace on 20 May AP Donald Trump's international Presidential trips US President Donald Trump is welcomed by Saudi King Salman bin Abdulaziz al-Saud upon arrival at King Khalid International Airport in Riyadh AFP/Getty Images Donald Trump's international Presidential trips U.S. President Donald Trump and first lady Melania Trump walk on the South Lawn prior to their first foreign trip Getty Images

But he was greeted warmly by volunteers and children at the NRG Center on Saturday and helped out by handing out hot dogs and loading relief supplies into vehicles.

“As tough as this was, it’s been a wonderful thing,” he said of the response to the storm.

“I want to congratulate everybody that’s worked so hard. It’s been an incredible five days, six days. It seems like it’s been much longer than that, but actually it’s going so well that it’s going fast, in a certain sense.”

After hugging survivors in the emergency shelter, Mr Trump smiled and said: “Have a good time, everybody!”

During a brief stop on a Texas street that had just become safe to use again, the President spotted a supporter wearing a “Trump is my president” T-shirt and pulled him in front of television cameras at the scene.

“Look at this guy,” he said. “You just became famous.”

The White House has asked Congress to approve a $7.9bn Harvey relief down payment when lawmakers return to Washington on Tuesday.