In this Wednesday, Sept. 27, 2017 photo, Ruby Rodriguez, 8, looks back at her mother as she wades across the San Lorenzo Morovis river with her family, since the bridge was swept away by Hurricane Maria, in Morovis, Puerto Rico. They were returning to their home after visiting family on the other side. Gerald Herbert/AP

President Donald Trump on Saturday slammed the mayor of San Juan, Puerto Rico's largest city, after she criticized the federal government's response to the devastation in Puerto Rico.

"The Mayor of San Juan, who was very complimentary only a few days ago, has now been told by the Democrats that you must be nasty to Trump," Trump said on Twitter. "...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."

Trump has come under fire in recent days for his slow response to the ongoing crisis in Puerto Rico, and has been criticized for appearing less attentive to the crisis in Puerto Rico than he was to Texas and Florida after those states were ravaged by hurricanes. It's been compared to the bungled federal response to Hurricane Katrina in 2005 under President George W. Bush.

Hurricane Maria left many of Puerto Rico's 3.4 million US citizens without shelter, water, power, and other basic necessities.

"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 said on Saturday. "The military and first responders, despite no electric, roads, phones etc., have done an amazing job. Puerto Rico was totally destroyed."

The president told reporters on Friday 10,000 emergency responders and other personnel had been sent to the island. Emphasizing the difficulty of the task of rebuilding devastated areas, Trump noted that the US territory is "an island surrounded by water."

The mayor of San Juan, Carmen Cruz, levelled direct criticism at the federal government's response on Saturday, and said if Trump does not ramp up relief efforts, there could be "something close to a genocide."

In this Sept. 24, 2017, photo, National Guard Soldiers arrive at Barrio Obrero in Santurce to distribute water and food among those affected by the passage of Hurricane Maria, in San Juan, Puerto Rico. Federal aid is racing to stem a growing humanitarian crisis in towns left without fresh water, fuel, electricity or phone service by the hurricane. Carlos Giusti/AP

"We are dying here," Cruz said in a press conference. "And I cannot fathom the thought that the greatest nation in the world cannot figure out logistics for a small island of 100 miles by 35 miles long."

"I am done being politically correct. I am mad as hell," Cruz continued. "So I am asking the members of the press, to send a mayday call all over the world. We are dying here."

"And if it doesn't stop, and if we don't get the food and the water into people's hands, what we are going to see is something close to a genocide."

Trump on Saturday morning also levelled some blame on the media, which he calls the "fake news," for portraying the federal government's response to Puerto Rico as inadequate.

"Fake News CNN and NBC are going out of their way to disparage our great First Responders as a way to "get Trump." Not fair to FR or effort!" the president tweeted on Saturday. "The Fake News Networks are working overtime in Puerto Rico doing their best to take the spirit away from our soldiers and first R's. Shame!"

Later on Saturday, Trump added in a tweet, "Despite the Fake News Media in conjunction with the Dems, an amazing job is being done in Puerto Rico. Great people!"

Trump also announced that he and First Lady Melania Trump will visit Puerto Rico on Tuesday.