The hurricane-caused devastation in Puerto Rico is turning into a calamity for local residents and threatens to undermine the Trump administration's reputation for effective crisis management.

Despite urgent medical needs and shortages of food and water, and amid intense news coverage of the crisis, President Donald Trump wrote on Twitter Thursday night in defense of the federal response. Trump said the Federal Emergency Management Agency and first responders were operating well.

"FEMA & First Responders are doing a GREAT job in Puerto Rico," Trump wrote. "Massive food & water delivered. Docks & electric grid dead. Locals trying really hard to help but many have lost their homes. Military is now on site and I will be there Tuesday. Wish press would treat fairly!"

Trump later tweeted, "Puerto Rico is devastated. Phone system, electric grid many roads, gone. FEMA and First Responders are amazing. Governor said 'great job.'"

Acting Homeland Security Secretary Elaine Duke told reporters in Washington, "I know it is really a good news story in terms of our ability to reach people and the limited number of deaths that have taken place in such a devastating hurricane."

New reports, however, showed a slow government response, prompting rising criticism. Sen. Bill Nelson, D-Fla., wrote on Twitter, "There is a crisis in Puerto Rico. Fuel, water & medicine sitting at the docks. Need immediate response by US military. Where is the cavalry?"

ABC News reported that "[R]esidents of Puerto Rico and outside observers have taken the government to task for what they see as delayed or insufficient action after Maria, the strongest hurricane to hit the island in nearly 90 years."

Hurricane Maria, which struck on Sept. 20, killed at least 16 people, terminated power to nearly all of Puerto Rico's 3.4 million residents and caused widespread cutoffs of clean water, electricity and communications.

Trump is being criticized for waiting too long to announce a waiver of the Jones Act, which requires that all goods shipped to the island travel on vessels owned and operated by Americans. Puerto Rico officials said this law was hampering aid deliveries and pointed out that waivers were quickly granted in Texas and Florida after recent Hurricanes Harvey and Irma. The Trump administration granted the waiver Thursday, and Army Lt. Gen. Jeffrey Buchanan was named to coordinate the government response, which federal officials said would grow immensely.

Trump has been criticized for getting distracted by other issues, such as protests by pro athletes during the playing of the national anthem at National Football League games, while Puerto Rico is dealing with a crisis that Gov. Ricardo Rossello called "probably the single biggest hurricane catastrophe in the history of the U.S." The president has complained about the island's "broken infrastructure and massive debt."

Trump is trying to avoid the withering criticism that plagued President George W. Bush for a slow government response to Hurricane Katrina in 2005.

Photos: Puerto Rico Devastation