President Donald Trump speaks to officials in Puerto Rico on Tuesday. Screenshot/White House President Donald Trump during a visit to Puerto Rico on Tuesday said the humanitarian-aid response in the Caribbean island and US territory had "thrown our budget a little out of whack."

"I hate to tell you, Puerto Rico, but you've thrown our budget a little out of whack, because we've spent a lot of money on Puerto Rico," Trump said.

He quickly added: "That's fine — we've saved a lot of lives."

Trump went on to compare the devastation in Puerto Rico from Hurricane Maria last month to that of Hurricane Katrina in the continental US in 2005, saying relatively few people had died as a result of the storm and ensuing loss of power, destruction of infrastructure, and widespread flooding.

"Every death is a horror," Trump said, "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 ... and what is your death count?"

Gov. Ricardo Rossello, seated beside the president, said there had been 16 confirmed deaths on the island, a number that is expected to rise.

"Sixteen people versus in the thousands," Trump said. "You can be very proud."

The president has been criticized for appearing to be less attentive to Puerto Rico's needs after Hurricane Maria than he was to the recent crises in Texas and Florida after hurricanes Harvey and Irma.

Trump's first public response to the devastation in the US territory came five days after Hurricane Maria hit, in a series of tweets in which he focused on Puerto Rico's weak infrastructure and economy.

Days later, he attacked the mayor of San Juan, Carmen Yulin Cruz, after she criticized the inefficiency of the federal government's relief efforts and asked Trump to send more help more quickly.

"Such poor leadership ability by the Mayor of San Juan, and others in Puerto Rico, who are not able to get their workers to help," he tweeted on Saturday. "They want everything to be done for them when it should be a community effort. 10,000 Federal workers now on Island doing a fantastic job."

Trump also argued that the mayor was criticizing him because she had "been told by the Democrats that you must be nasty to Trump."

The president's comments sparked widespread condemnation from Democrats, celebrities, and Puerto Ricans.

Trump and Cruz exchanged pleasantries on Tuesday, according to a White House pool report. In his remarks, Trump thanked Rossello for refusing to "play politics" with the relief effort.

Trump has repeatedly lashed out at the media's coverage of the crisis in Puerto Rico, which he claims has been a concerted attack on his administration and federal first responders.

"Fake News CNN and NBC are going out of their way to disparage our great First Responders as a way to 'get Trump,'" he tweeted on Saturday. "Not fair to FR or effort!"