President Trump waived the shipping restrictions for Puerto Rico on Thursday that the island's governor has said complicate and raise the price of hurricane relief.

White House press secretary Sarah Huckabee Sanders announced the decision in a Twitter message. The move comes after criticism that the White House has been slow to help Puerto Rico recover from the devastation of Hurricane Maria.

Trump tweeted later Thursday about the “totally shot” condition of Puerto Rico's electrical infrastructure.

Puerto Rico's governor, Ricardo Rosselló, had said Wednesday that he expected the waiver, which suspends a 1920 law requiring that only U.S.-flagged vessels be used for shipments between two U.S. ports. The law, known as the Jones Act, limits the number of ships that can be sent to Puerto Rico, a U.S. territory, and thus the amount of relief supplies that have come in since the hurricane.

The Department of Homeland Security had said as recently as Monday that the law would not be suspended. The department said then that enough ships were available to meet the need.

On Wednesday, Trump had suggested that he would not waive the restriction.

“We’re thinking about that,” he told reporters at the White House. “But we have a lot of shippers and … a lot of people who work in the shipping industry that don’t want the Jones Act lifted. And we have a lot of ships out there right now.”

Critics of the act had said that Trump, who temporarily waived the act in Texas and Florida after storms hit, cared more about a few U.S. shippers than he did about 3.4 million people living in Puerto Rico.

Critics also call the law a protectionist relic, and the Wall Street Journal editorialized this week that it should be permanently repealed.

The Trump administration has already rushed military hardware and personnel to Puerto Rico and the Virgin Islands as the scale of the damage has become clear, along with the inadequacy of the federal response.

In the first six days after the hurricane made landfall in Puerto Rico as a Category 4 storm, the Navy had deployed just two ships, citing concerns that Puerto Rico’s ports were too damaged to accommodate numerous large vessels, The Washington Post reported Thursday.

Reports of isolated U.S. citizens struggling in the heat without electricity and running low on food and water have now spurred the Pentagon to throw resources into the relief ­effort even though they have not been specifically requested by territorial officials.

The stepped-up response includes the deployment of the USNS Comfort, a hospital ship that has responded to other natural disasters.

Steven Mufson contributed to this report