– President Donald Trump lashed out at the mayor of San Juan on Saturday for criticizing his administration’s efforts to help Puerto Rico, accusing her of “poor leadership” and implying that the people of the devastated island were not doing enough to help themselves.

As emergency workers and troops struggled to restore basic services in a commonwealth with no electricity and limited fuel and water, Trump spent the day at his New Jersey golf club, blasting out Twitter messages defending his response to the storm and repeatedly assailing the capital’s mayor, Carmen Yulín Cruz, and the news media.

“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,” he wrote 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 said the people of Puerto Rico should not depend entirely on the federal government. “They want everything to be done for them when it should be a community effort,” he wrote. “10,000 Federal workers now on Island doing a fantastic job. The military and first responders, despite no electric, roads, phones etc., have done an amazing job. Puerto Rico was totally destroyed.”

The president’s stream of Twitter bolts appeared repeatedly over the course of 12 hours and touched off a furious day of recriminations that fueled questions about his leadership. Although Trump earned generally high marks for his handling of hurricanes that struck Texas and Florida recently, he has been sharply criticized for being slow to sense the magnitude in Puerto Rico and project urgency about helping.

He has explained that the challenges are different because Puerto Rico is “an island surrounded by water — big water, ocean water,” as he put it on Friday, but in recent days he has stepped up his public statements and dispatched a three-star general to take over the response. Trump’s aggressive Twitter messages Saturday were in keeping with how he has acted during other moments of crisis, notably when he assailed the mayor of London, who is Muslim, after a terrorist attack, asserting that he did not take the threat seriously enough.

In the case of Cruz, Trump took her outcry as a personal assault. While other presidents generally ignore most of the criticism they invariably attract, Trump is not one to let anything go unanswered. In one of his books, he titled a chapter “Revenge,” writing that “when someone crosses you, my advice is ‘Get even!’ If you do not get even, you are just a schmuck!”

His attack on Cruz on Saturday was amplified by a top aide, who retweeted a message she had written during last year’s campaign endorsing Hillary Clinton over Trump. “realDonaldTrump hater, the Mayor of San Juan — is the perfect example of an opportunistic politician,” wrote Dan Scavino Jr., the president’s social media director.

Responding to Trump’s tweets Saturday, Cruz said she would not be distracted by “small comments” and denied that she was attacking the president at the behest of the Democrats. “Actually, I was asking for help,” she told MSNBC. “I wasn’t saying anything nasty about the president.”

She pointed to comments made Friday by Lt. Gen. Jeffrey Buchanan, who is leading the response effort and who said he did not have enough troops and equipment. “So who am I?” Cruz asked. “I’m just a little mayor from the capital city of San Juan. This is a three-star general telling the world that right now he does not have the appropriate means and tools to take care of the situation.”

The attacks on the mayor generated a backlash from celebrities and others who noted that the president was spending the weekend in the comfort of his golf club while Cruz was struggling to help her constituents on an island with no power. “She has been working 24/7,” Lin-Manuel Miranda, creator of “Hamilton,” the hit Broadway musical, wrote on Twitter. “You have been GOLFING. You’re going straight to hell. Fastest golf cart you ever took.”

The president was out of sight Saturday, secluded at his club in New Jersey, miles away from the pool of journalists who follow him. Aides would not say whether he went golfing, although they said he had telephone calls scheduled with Puerto Rico’s governor and the head of the Federal Emergency Management Agency.

Cruz became a powerful voice of grievance Friday when she went on TV to plead for help and reject assertions by the Trump administration about how well it was responding. She was incensed by comments made by Elaine Duke, acting secretary of the Homeland Security Department, who had said Thursday that it was “really a good news story in terms of our ability to reach people and the limited number of deaths” from the hurricane.

“This is, damn it, this is not a good news story,” Cruz said on CNN. “This is a ‘people are dying’ story. This is a ‘life or death’ story. This is ‘there’s a truckload of stuff that cannot be taken to people’ story. This is a story of a devastation that continues to worsen.”

Duke traveled to Puerto Rico on Friday and tried to smooth things over, agreeing that the situation on the ground was “not satisfactory.”

Buchanan, who arrived in Puerto Rico on Thursday to take over the hurricane response, said Friday that he needed more personnel and resources. “The answer is no, it’s not enough and we’re bringing more in.”