(USA Today) - President Trump waived shipping restrictions for Puerto Rico based on a request from Gov. Ricardo Rossello and after an outcry from Congress about shortages of fuel, food and emergency supplies on the island after Hurricane Maria.

Rossello quickly thanked Trump for the assistance.

The Jones Act prohibits foreign-flagged vessels from picking up and delivering fuel between U.S. ports. But government officials said it wasn’t clear immediately there was justification to waive the law for national defense.

The island was battered by repeated hurricanes, most severely by Maria, and residents faced shortages of all supplies. Lawmakers including Sen. John McCain, R-Ariz., and Rep. Nydia Velazquez, D-N.Y., urged the Trump administration to waive the Jones Act to allow more supplies to reach the island.

More: Why Puerto Rico is being denied shipping deliveries of fuel

The administration waived the act for Southeastern states — and included Puerto Rico for petroleum products — from Sept. 8 through 22, after Hurricanes Harvey and Irma. But Defense and Homeland Security officials said there were plenty of ships to supply Puerto Rico — the problem was moving supplies around the island because of roads blocked by trees and landslides.

Elaine Duke, acting secretary of Homeland Security, said the waiver followed Rossello's request and the Defense Department's determination that the waiver was in the interest of national defense. The waiver will be in effect 10 days and covers all products.

“This waiver will ensure that over the next 10 days, all options are available to move and distribute goods to the people of Puerto Rico," Duke said. "It is intended to ensure we have enough fuel and commodities to support lifesaving efforts, respond to the storm, and restore critical services and critical infrastructure operations in the wake of these devastating storms."

Trump, who plans to visit the island Tuesday, had said Wednesday that he was studying the matter, but that the U.S. shipping industry was opposed to waiving the law.

Sarah Sanders, Trump’s spokeswoman, tweeted Thursday that the Jones Act would be waived.

“It will go into effect immediately,” Sanders said.