WASHINGTON — President Donald Trump on Tuesday told Puerto Rican officials they should feel “very proud” they haven’t lost hundreds of lives like in “a real catastrophe like Katrina,” while adding that the devastated island territory has thrown the nation’s budget “a little out of whack.”

Trump’s remarks came as he touched down in San Juan for his first visit to Puerto Rico since Hurricane Maria ravaged the island nearly two weeks ago. He has faced criticism for the slow federal response to the natural disaster, although he praised himself earlier in the day for his administration’s “great job” and “A-plus” response to the storm, which raked the island as a Category 4 hurricane.

“Every death is a horror, but if you look at a real catastrophe like Katrina, and you look at the tremendous — hundreds and hundreds and hundreds of people that died, and you look at what happened here, with really a storm that was just totally overpowering, nobody’s ever seen anything like this,” Trump said, before turning to a local official to ask how many people had died in storm. “What is your death count as of this moment? 17? 16 people certified, 16 people versus in the thousands.”

Trump then praised officials in the room over the death toll, which was later revised to 34. “You can be very proud of all of your people, all of our people working together,” he said.

Trump also seemed to fault the small island for imperiling the country’s budget by requiring hurricane relief funds, saying, “I hate to tell you, Puerto Rico, but you’ve thrown our budget a little out of whack.”

Senate Minority Leader Chuck Schumer, D-N.Y., rebuffed Trump’s comments about how the Puerto Rican hurricane response is affecting the federal budget, noting that the president never made such comments in Texas or Florida following hurricanes there.

“Mr. President, enough,” said Schumer, whose state has the largest population of Puerto Ricans on the mainland. “Stop blaming Puerto Rico for the storm that devastated their shores. Roll up your sleeves and get the response on track.”

Schumer added: “When one part of the country has trouble, the rest of the country reaches out and says, ‘We’re going to help you.’?”

Trump’s response to Maria offers a sharp contrast with his actions in the wake of Hurricane Harvey, which ravaged Southeast Texas. Trump visited Texas twice in the week after Harvey’s landfall, first in his role as commander in chief, checking in on relief efforts, and then as a “consoler in chief,” offering hugs and prayers.

Though Trump and his administration initially offered a flurry of action as Maria tore through Puerto Rico, the president then effectively went dark, decamping for a long weekend at his private club in Bedminster, N.J.

Trump at points also seemed to blame Puerto Ricans themselves for their plight, lashing out at the mayor of San Juan — after she pleaded on cable TV for the federal government to “save us from dying” — for her “poor leadership ability” and writing on Twitter that the island’s citizens “want everything to be done for them when it should be a community effort.”

Kathleen Blanco, a Democrat who was governor of Louisiana during Hurricane Katrina in 2005, said that while Trump “has the oddest responses,” his comments in Puerto Rico did not surprise her — and she hoped that he would learn more about the needs of the territory during the visit.

The White House as soon as Wednesday will ask Congress to authorize almost $30 billion in new funding to address the three deadly hurricanes that have devastated Puerto Rico and parts of Texas and Florida in recent weeks, a senior administration official said.

The funding request includes $12.77 billion in disaster recovery funds, $577 million to address wildfires, and another $15 billion to fund the flood insurance program.

After Trump’s impromptu remarks to officials, his motorcade drove along a highway lined with broken highway dividers and hundreds of downed trees. He took a walking tour of Guaynabo, a municipality south of San Juan, stopping to pose for photos with locals and chat about the hurricane and basketball.

As he finished talking with one family, he told them: “Have a good time.”

Associated Press contributed.