President Donald Trump on Thursday removed shipping restrictions that critics said held back the disaster response in hurricane-battered Puerto Rico.

The Jones Act will be waived "immediately," press secretary Sarah Huckabee Sanders said. Trump made the decision at the request of Puerto Rico Gov. Ricardo Rossello, she said.

Sanders: At @ricardorossello request, @POTUS has authorized the Jones Act be waived for Puerto Rico. It will go into effect immediately.

Rossello had asked Trump to temporarily waive the law as the island seeks food, water and other supplies following widespread devastation from Hurricane Maria.

The roughly 100-year-old Jones Act requires goods shipped between American ports to travel on U.S.-flagged ships with American crews. Critics like Sen. John McCain, R-Ariz., argued it had unnecessarily raised costs on Puerto Ricans in need of supplies. The island relies heavily on ports.

"I am very concerned by the Department's decision not to waive the Jones Act for current relief efforts in Puerto Rico, which is facing a worsening humanitarian crisis following Hurricane Maria," McCain wrote to acting Department of Homeland Security Secretary Elaine Duke this week.

"It is unacceptable to force the people of Puerto Rico to pay at least twice as much for food, clean drinking water, supplies and infrastructure due to Jones Act requirements as they work to recover from this disaster," McCain added.

The Trump administration waived the act after recent hurricanes Harvey and Irma, which battered Florida and Texas.

Trump has faced criticism for the White House's response to the damage in Puerto Rico, which was devastated after a direct hit by the Category 4 hurricane's torrential rain and 150 mph wind on Sept. 20.

In a CNBC phone interview earlier Thursday, Rossello said Puerto Rico's power grid is destroyed, leaving virtually the entire island in the dark. Diesel fuel, which is desperately needed to run generators for emergency services such as hospitals, is scarce.

Trump defended his administration's actions, saying "all available federal resources" are being deployed to save lives and start the recovery process.

He plans to visit the island on Tuesday.