Before leaving the White House on Tuesday, Mr. Trump told reporters he believed Ms. Cruz was now mostly satisfied.

“I think she’s come back a long way,” he said. “I think it’s now acknowledged what a great job we’ve done.” He asserted that the relief effort was as effective as those in Texas and Florida, and he added, “It’s actually a much tougher situation.”

Mr. Trump, however, repeated his earlier criticism that some Puerto Ricans were not doing enough to help themselves. Despite the roads being cleared and communications being re-established, he said, truck drivers were not transporting enough supplies. “We need their truck drivers to start driving trucks,” he said. “On a local level, they have to give us more help.”

On Saturday, after Ms. Cruz angrily disputed the administration’s assertion that the relief effort was going well, the president fired back in a Twitter post that she had been instructed by Democrats to be “nasty to Trump,” and added that Puerto Ricans “want everything to be done for them.”

White House officials were nervous that Mr. Trump would be set off again if he were greeted by protesters in Puerto Rico. As late as Monday afternoon, some aides were urging the president to delay the visit, which came a day before he was scheduled to fly to Las Vegas to meet with law enforcement officials and victims of Sunday’s mass shooting there.

There were a few other signs of discontent on Tuesday. As Mr. Trump’s motorcade drove from an air base to a church — passing hundreds of downed trees — it also passed a woman clutching a placard that said, “You are a bad hombre,” according to a pool report.