The White House announced early Thursday that President Trump has agreed to waive the Jones Act, which will temporarily lift shipping restrictions on Puerto Rico and enable the hurricane-ravaged island to receive necessary aid.

The waiver from the shipping law, which requires American-made and -operated vessels to transport cargo between U.S. ports, will only last for 10 days and goes into effect immediately.

"At @ricardorossello request, @POTUS has authorized the Jones Act be waived for Puerto Rico. It will go into effect immediately," White House press secretary Sarah Huckabee Sanders wrote on Twitter, referring to Puerto Rico Gov. Ricardo Rosselló.

Lawmakers in Congress since Monday have been pushing for a one-year waiver from the rules in order to help speed up deliveries of food, fuel and other critical supplies to Puerto Rico, which has been battered by two hurricanes in the last month. Officials estimate that the island could be without power for six months.

The administration faced fierce backlash for not immediately lifting the law for Puerto Rico after it issued a two-week waiver for Texas and Florida in response to Hurricanes Harvey and Irma.

White House homeland security adviser Tom Bossert said on Twitter early Thursday that the Puerto Rico waiver was granted "immediately" after Rosselló had petitioned Trump for the exemption Wednesday night.

San Juan Mayor Carmen Yulín Cruz praised the administration's decision on Thursday, which she said could help bring down the cost of supplies and construction materials by nearly 33 percent.

"Our cries for justice were heard," she said on CNN. "The president did the right thing, and stood on the right side of history."

"Sometimes it doesn't matter why things happen and who makes things happen, when justice prevails," Cruz added.

But she also warned that there are still thousands of containers sitting idle at the ports of San Juan, a problem she blamed on "jurisdictional" and bureaucratic issues. Cruz called on the Federal Emergency Management Agency and the governor to release the supplies to bigger and closer distribution centers.

"I have no jurisdiction over those ports," Cruz said. "Just like Trump heard the cry for justice to repeal the Jones Act, I ask you, I beg you, to repeat this and repeat this."

Mallory Shelbourne contributed to this report, which was updated at 9:00 a.m.