Updated

The House of Representatives Thursday approved a $36.5 billion disaster aid package, which includes assistance for hurricane-hit Puerto Rico.

The vote took place hours after President Donald Trump warned on Twitter that the federal government "cannot keep FEMA, the Military & the First Responders ... in [Puerto Rico] forever!"

The bill passed 353-69, with all 69 "no" votes coming from Republicans. The package also includes assistance for those rebuilding after hurricanes in the Southeast and wildfires in the West. Congress is expected to approve at least three more bills in the coming months to cover natural disasters.

Forty-five deaths in Puerto Rico have been blamed on Maria, about 85 percent of Puerto Rico residents still lack electricity and the government says it hopes to have electricity restored completely by March.

House Speaker Paul Ryan, R-Wis., said the government needs to ensure that Puerto Rico can "begin to stand on its own two feet" and said the U.S. has "got to do more to help Puerto Rico rebuild its own economy." He planned to visit the island on Friday.

Both Trump and Vice President Mike Pence visited the island last week to offer the U.S. commitment to the island's recovery. But in a series of tweets Thursday morning, the president blamed Puerto Rico for its looming financial crisis and "a total lack of accountability." Trump added that "electric and all infrastructure was disaster before hurricanes."

The tweets conflicted with Trump's past statements on Puerto Rico. During an event last week honoring the heritage of Hispanics, for example, the president said, "We will be there all the time to help Puerto Rico recover, restore, rebuild."

Democrats said Trump's attacks were "shameful," given that the 3 million-plus U.S. citizens on Puerto Rico are confronting the kind of hardships that would draw howls of outrage if they affected a state. One-third of the island lacks clean running water and just 8 percent of its roads are passable, according to government statistics.

"It is shameful that President Trump is threatening to abandon these Americans when they most need the federal government's help," said House Minority Whip Rep. Steny Hoyer, D-Md.

After years of economic challenges, Puerto Rico was already in the process of restructuring much of its $74 billion in debt before the hurricane struck. The financial situation is more complicated than Trump's tweets suggest.

Puerto Rico lost population and jobs after Congress eliminated special tax breaks in 2006, making it more difficult to repay its debts. Yet lenders continued to extend credit to Puerto Rico despite its economic struggles, while pension costs strained Puerto Rico's government and its infrastructure deteriorated.

The aid package approved Thursday sticks close to a White House request. For now, it ignores huge demands from the powerful Florida and Texas delegations, which together pressed for some $40 billion more.

A steady series of disasters could put 2017 on track to rival Hurricane Katrina and other 2005 storms as the most costly set of disasters ever. Katrina required about $110 billion in emergency appropriations.

The bill combines $18.7 billion for the Federal Emergency Management Agency with $16 billion to permit the financially troubled federal flood insurance program pay an influx of Harvey-related claims. An additional $577 million would pay for western firefighting efforts.

Up to $5 billion of the FEMA money could be used to help local governments remain functional as they endure unsustainable cash shortfalls in the aftermath of Maria, which has choked off revenues and strained resources.

"It's not easy when you're used to living in an American way of life, and then somebody tell you that you're going to be without power for six or eight months," said Resident Commissioner Jenniffer Gonzalez-Colon, who represents Puerto Rico as a nonvoting member of Congress. "It's not easy when you are continue to suffer — see the suffering of the people without food, without water, and actually living in a humanitarian crisis."

Fox News' Chad Pergram and the Associated Press contributed to this report.