HOUSTON ― President Donald Trump landed in Texas on Tuesday to meet with officials on the ground and assess damage from Hurricane Harvey, as residents continued to grapple with massive flooding and persistent rainfall.

Since making landfall on Friday as a Category 4 storm, Harvey has dumped more than 40 inches of rain across southern Texas and displaced tens of thousands of people. Some of the worst effects have hit Houston, the nation’s fourth-largest city.

As of Tuesday morning, the storm had broken the record for the most rainfall in the continental U.S., according to the National Weather Service.

The president and first lady Melania Trump made stops in Corpus Christi, near where the storm made landfall, and in Austin, the site of the storm’s emergency response center.

Lawmakers and officials updated Trump on the storm during his first stop. The president praised recovery and rescue efforts, but added that “we don’t want to say congratulations. We’ll congratulate each other when it’s all finished.”

Trump expressed awe at Harvey’s “epic proportions,” and said officials’ response to the storm could serve as a model for the future.

“We want to be looked at in five years, in 10 years from now as, this is the way to do it,” he said. “We want to do it better than ever before.”

Trump avoided visiting areas hit hardest by the storm, saying he did not want to disrupt rescue and recovery efforts with the complicated logistics of a presidential visit.

“The president wants to be very cautious about making sure that any activity doesn’t disrupt any of the recovery efforts that are still ongoing, which is the reason for the locations we are going here today,” White House press secretary Sarah Huckabee Sanders told reporters aboard Air Force One.

JIM WATSON via Getty Images President Donald Trump and first lady Melania Trump arrive in Corpus Christi, Texas, on Tuesday.

The trip presents the Trump administration with a major test, as the storm and its aftermath make up perhaps the first crisis that was not of the president’s own making.

Trump received criticism for callously responding to the storm, releasing a barrage of other news as the hurricane made landfall on Friday evening, and posting a stream of unrelated tweets throughout the weekend.

The tweets that did mention Harvey’s progression often read as self-congratulatory. As the deadly storm dumped torrential rain and stranded residents, Trump appeared to be awestruck by Harvey’s “historic” and “record breaking” nature, praised authorities’ “all out effort” for “going well!” and celebrated the “spirit of the people.”

HISTORIC rainfall in Houston, and all over Texas. Floods are unprecedented, and more rain coming. Spirit of the people is incredible.Thanks! — Donald J. Trump (@realDonaldTrump) August 27, 2017

But in scripted comments made during a joint press conference with Finnish President Sauli Niinistö on Monday, Trump struck a more measured tone — although he again noted the “epic” and “historic” storm, saying “there’s probably never been anything like this.”

“I want to begin today by extending my thoughts and prayers for those affected by Hurricane Harvey and the catastrophe of flooding and all of the other difficulties that they’re currently going through in Houston, in southeast Texas,” he said in his introductory remarks.

“Recovery will be a long and difficult road, and the federal government stands ready, willing and able to support that effort,” he added, pledging to pass federal funding for recovery efforts.

But Trump, a former reality television personality, also mentioned the “ratings” that came from the storm when defending the timing of pardoning controversial former Sheriff Joe Arpaio on Friday night.

“I assumed the ratings would be far higher than they would be normally,” he said. “You know, the hurricane was just starting.”

Carlos Barria / Reuters The president and first lady receive a briefing on Tropical Storm Harvey relief efforts with Texas Gov. Greg Abbott in Corpus Christi.

Trump again referred to the television coverage on Tuesday, praising Federal Emergency Management Agency Administrator Brock Long as “a man who really has become very famous on television in the last couple of days.”

Outside the briefing, he addressed supporters, climbing up a ladder and marveling: “What a crowd, what a turnout,” he said, according to White House pool reporters.

Trump also promised Texans that “we’re going to get you back and operating immediately.” His statement contradicted other authorities, like Long, who said Sunday that FEMA’s recovery efforts could take years.

“We want him to see and understand the enormous challenges that Texans have faced and the need for the aid that he’s providing,” Texas Gov. Greg Abbott (R) told CNN from the tarmac as Air Force One landed in Corpus Christi. “He’s a champion of Texas and a champion of helping us rebuild, and I think we will hear that commitment.”

In an email to supporters on Tuesday, Trump’s re-election campaign encouraged donations to the Red Cross, Salvation Army, United Way and animal rescue groups, according to The Associated Press.

Trump received another briefing on Tuesday from state officials at the Texas Department of Public Safety’s Emergency Operations Center in Austin.

He again remarked on the scale of the damage.

“The sad thing is that this is long-term. Nobody’s ever seen anything this long. Nobody’s seen this much water,” he said. “Probably, there’s never been something so expensive in our country’s history. There’s never been something so historic in terms of damage.”

Carlos Barria / Reuters Trump holds a flag of the state of Texas after receiving a briefing on Harvey relief effort in Corpus Christi.

The president has said he may return to the region this weekend to visit Louisiana. The state’s residents are bracing for torrential rainfall from Harvey’s remnants. On Monday, Trump issued a disaster declaration for the Louisiana and authorized it to receive emergency federal aid. He had issued such a declaration for Texas ahead of the storm last week. The storm’s progression changed dramatically over the weekend.

The relentless rain and rising floodwaters have complicated already perilous recovery and rescue efforts across the region.

Since Monday, the U.S. Army Corps of Engineers has been conducting controlled releases of dams, as the water has reached record levels.

“We are deeply concerned about those dams,” Abbott said Tuesday on “Fox & Friends.” “This is going to be a minute-by-minute process.”

A levee in Brazoria County, which is south of Houston, breached on Tuesday, forcing further evacuations. Authorities warned that other levees and reservoirs in the area could breach, as the rainfall is expected to continue throughout the week.

First responders have focused on rescuing people in life-threatening conditions, and hospitals have taken major precautions, evacuating patients out of flooded facilities and sealing off low-lying areas inundated in water.

Andy Campbell/HuffPost The George R. Brown Convention Center in downtown Houston is being used as a temporary shelter for thousands of displaced residents.

FEMA has estimated that more than 30,000 people will be displaced due to the storm and seek temporary shelters.

The George R. Brown Convention Center in downtown Houston, which is being used as a temporary shelter, received 9,000 evacuees, according to local news reports. Its official capacity is 5,000 people.

Long, the FEMA administrator, stressed that the situation was under control.

“We’re very aware of the issues at the convention center. But let me be clear: This is not the Superdome,” he said Tuesday, referring to the disastrous evacuation efforts during Hurricane Katrina in 2005. “They have food, security, I have an incident management team inside the city of Houston as we speak.”

Jet George, 44, of Houston, didn’t lose his home. Hee wanted to help those who did, so he went downtown to donate bags of jackets and other supplies at the convention center.

“We’re all kind of swamped in together,” he told HuffPost. “This is crazy. I’ve lived here all my life and never seen anything like this ... we were lucky so we thought we’d bring things they said they needed.”

Andy Campbell contributed reporting from Houston.

This is a developing story. Check back for updates.