President Trump warned Thursday that FEMA and the U.S. military can't provide aid to Puerto Rico "forever," even as the hurricane-battered island struggles to provide power, water and other basic services three weeks after the devastation wrought by Hurricane Maria.

Trump's tweets drew a sharp response from San Juan Mayor Carmen Yulin Cruz, who referred to the president on Twitter as a "hater-in-chief."

White House Chief of Staff John Kelly addressed the issue at a press briefing later in the day, saying the tweet was "exactly accurate," that the goal of an emergency worker is to "work yourself out of a job."

"Our country will stand with those American citizens in Puerto Rico until the job is done," Kelly said.

Trump also tweeted that Congress must decide how much money the federal government will spend and noted that "electric and all infrastructure was disaster before hurricanes."

More than 80% of the island remains without power since the Category 4 storm made landfall Sept. 20 with sustained winds approaching 155 mph. More than 40 people were killed and entire communities were destroyed. Communications were compromised and damage to ports, airports and roads further conspired to complicate aid efforts.

"We cannot keep FEMA, the Military & the First Responders, who have been amazing (under the most difficult circumstances) in P.R. forever!" Trump tweeted.

FEMA spokeswoman Eileen Lainez was somewhat more encouraging, tweeting that the agency would be with Puerto Rico and anywhere else affected by a disaster "every day, supporting throughout their response & recovery"

Trump also quoted conservative talk show host Sharyl Attkisson as saying that Puerto Rico survived Hurricane Maria and now faces a financial crisis "of its own making."

Puerto Rico has been in recession for a decade. Facing more than $70 billion in debts, the island defaulted on its bonds and filed for the equivalent of bankruptcy in May. That has essentially locked Puerto Rico out of the bond market, leaving little room to borrow money for the rebuild.

Cruz and Senate Minority Leader Chuck Schumer, D-N.Y., led a social media charge challenging Trump's assertions.

Tweeted Schumer: "There is still devastation, Americans are still dying. FEMA needs to stay until the job is done."

More:Puerto Rico congresswoman: 'We need more boots on the ground'

More:Nearly 3 weeks after Maria, distributing aid across Puerto Rico is a mess

More:San Juan mayor on Trump exchange: 'I don't give a (expletive)'

FEMA says 19,000 federal civilian and military personnel are supporting Puerto Rico and the U.S. Virgin Islands. Trump has consistently portrayed the emergency response in Puerto Rico as effective and successful. That narrative has drawn scorn from Cruz, whom Trump previously described as "nasty."

The mayor hasn't shied from Trump's wrath, recently donning a "Nasty" T-shirt. And she was not quiet in the face of Trump's tweets Thursday.

"@POTUS It is not that you do not get it; you are incapable of fulfilling the moral imperative to help the people of PR. Shame on you.!" Cruz tweeted, then adding "your comments about Puerto Rico are unbecoming of a Commander in Chief they seem more to come from a “Hater in Chief”.

The territory's congressional representative also weighed in, telling USA TODAY the devastated area "desperately" needs federal support.

"If you take those resources away, you will leave Puerto Rico out in a limbo of catastrophic dimension," Resident Commissioner Jenniffer González-Colón said. "I don't know where those comments come from and what's the intel behind it, but the reality on the island is that we need more boots on the ground."

Trump's warning came a day after FEMA awarded the Puerto Rico water authority $70 million for emergency work, bringing the total amount of assistance awarded to individuals and communities to $210 million, FEMA said.

Gov. Ricardo Rosselló has warned that Puerto Rico faces a severe cash crisis, and legislation pending in Congress would provide almost $5 billion in loans to local governments. The money is part of a funding bill totaling more than $35 billion in emergency relief for the island as well as Texas, Florida, California and the Virgin Islands.

Maria hit Puerto Rico and the Virgin Islands soon after of the powerful one-two punch to the U.S. mainland dealt by Hurricane Harvey, which laid waste to a swath of the Texas Gulf Coast, and Hurricane Irma, which hammered Florida so unrelentingly that most of the state lost power.

Those storms kept FEMA on full alert for weeks before Maria blasted Puerto Rico.

California wine country is on the aid list because of a series of fires that have killed more than 20 people and destroyed thousands of homes and businesses.

Contributing: Jessica Estepa