President Trump waved a Texas flag to cheering hurricane survivors Tuesday as he proclaimed “Texas can handle anything!”

In a spontaneous gesture, Mr. Trump emerged from a disaster briefing at a firehouse in Annaville, Texas, and climbed a ladder between two firetrucks to address a crowd about 1,000 people with a portable microphone and amplifier.

“We love you, you are special, we are here to take care of you,” the president said. “It’s going well. It’s historic, it’s epic, but I will tell you, it happened in Texas, and Texas can handle anything.”

He then held up a flag of the Lone Star state, to cheers from the crowd. The people shouted “We love you!” and yelled his name.

The president landed in Texas late Tuesday morning with a team of federal officials to tour storm damage from Hurricane Harvey.

Mr. Trump met with state and local officials at a firehouse in Annaville to receive an update on recovery efforts. The president called it a storm “of epic proportions,” and praised the coordination between federal and state officials.

“It’s a real team,” Mr. Trump said. “We won’t say ‘congratulations,’ we don’t want to do that. We’ll congratulate each other when it’s all finished. This is a very special place and a special state.”

He said of the recovery effort, “We want to do it better than ever before.”

Mr. Abbott expressed his “deep gratitude” to the president and his Cabinet for their help, saying the administration began coordinating with state officials about 10 days before Harvey made landfall.

“We can count on the president of the United States and his staff for helping Texas,” Mr. Abbott said. “Texas has been tested, but our response to the challenges has been made much more effective because of the very effective way the president and his staff have helped Texas respond.”

Air Force One landed in Corpus Christi, Texas, in clear weather, deliberately staying away from the hardest-hit areas closer to Houston where massive flooding is still threatening lives and forcing emergency responders to rescue thousands of stranded residents. The president’s motorcade passed broken trees, flattened road signs and fences blown over by hurricane-strength winds.

“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,” said White House press secretary Sarah Sanders. “As of right now, I don’t know that we will be able to get to some of the really damaged areas.”

The president also is expected to visit Austin, the state capital, to receive more updates from state officials.

Among those traveling with the president are Health and Human Services Secretary Tom Price, Housing and Urban Development Secretary Ben Carson, Small Business Administrator Linda McMahon and acting Secretary of Homeland Security Elaine Duke. First lady Melania Trump also accompanied the president on the trip.