FILE - In this Thursday, Sept. 14, 2017 file photo, Speaker of the House Paul Ryan, R-Wis., speaks during a news conference after the passage of a sweeping $1.2 trillion spending bill to fund the government, at the Capitol in Washington. The House is on track to backing President Donald Trump's request for billions more in disaster aid, $16 billion to pay flood insurance claims and emergency funding to help the cash-strapped government of Puerto Rico stay afloat. Ryan is traveling to Puerto Rico on Friday, Oct. 13, 2017. (AP Photo/J. Scott Applewhite, File)

WASHINGTON (AP) — President Donald Trump lashed out at hurricane-devastated Puerto Rico on Thursday, insisting in tweets that the federal government can’t keep sending help “forever” and suggesting the U.S. territory was to blame for its financial struggles.

His broadsides triggered an outcry from Democrats in Washington and officials on the island, which has been reeling since Hurricane Maria struck three weeks ago, leaving death and destruction in an unparalleled humanitarian crisis.

San Juan Mayor Carmen Yulin Cruz, with whom Trump has had a running war of words, tweeted that the president’s comments were “unbecoming” to a commander in chief and “seem more to come from a ‘Hater in Chief.'”

“Mr. President, you seem to want to disregard the moral imperative that your administration has been unable to fulfill,” the mayor said in a statement.

The debate played out as the House passed, on a sweeping 353-69 vote, a $36.5 billion disaster aid package that includes assistance for Puerto Rico’s financially-strapped government. 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.”

White House Press Secretary Sarah Huckabee Sanders praised the House action Thursday night and promised the administration “will continue to work with Congress to provide the resources necessary to recover and rebuild from the hurricanes” and the wildfires in California.

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.

Both Trump and Vice President Mike Pence visited the island last week to reaffirm the U.S. commitment to the island’s recovery. But Trump’s tweets Thursday raised questions about whether the U.S. would remain there for the long haul. He tweeted, “We cannot keep FEMA, the Military & the First Responders, who have been amazing (under the most difficult circumstances) in P.R. forever!”

In a series of tweets, the president added, “electric and all infrastructure was disaster before hurricanes.” He blamed Puerto Rico for its looming financial crisis and “a total lack of accountability.”

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.”

White House chief of staff John Kelly, speaking to reporters, said the military and other emergency responders were trying very hard to “work themselves out of a job.” Reassuring the island, Kelly said the U.S. will “stand with those American citizens in Puerto Rico until the job is done.”

At the Pentagon, Lt. Gen. Kenneth F. McKenzie Jr. told reporters “there’s still plenty of work to be done” by the military troops in Puerto Rico. He said there was no current plan to withdraw troops who are supporting FEMA’s recovery efforts. McKenzie, director of the military’s Joint Staff, said it will be up to FEMA and other civilian agencies to decide when the military is no longer needed there.

Democrats said Trump’s tweets were deplorable, 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 Maryland Rep. Steny Hoyer, the second-ranking House Democrat.

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 legislative aid package totals $36.5 billion and 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.

Ryan, the House speaker, planned to visit Puerto Rico on Friday. He has promised that the island will get what it needs.

“It’s not easy when you’re used to living in an American way of life, and then somebody tells 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.”

___

Associated Press writers Josh Boak and Robert Burns contributed to this report.