The delayed legislation will send funds to the hurricane-battered island of Puerto Rico and to states damaged by hurricanes, flooding, wildfires and earthquakes. The recipients include California, Florida, Georgia and Iowa.

President Donald Trump said he signed a long-awaited $19 billion disaster relief bill on Thursday to give aid to states and territories ravaged by storms.

"Just signed Disaster Aid Bill to help Americans who have been hit by recent catastrophic storms," Trump tweeted on Thursday along with a photo of him holding a signed document. "So important for our GREAT American farmers and ranchers."

He also contended that "Puerto Rico should love President Trump." The president claimed the island "would have been shut out" without him.

Trump tweet: Just signed Disaster Aid Bill to help Americans who have been hit by recent catastrophic storms. So important for our GREAT American farmers and ranchers. Help for GA, FL, IA, NE, NC, and CA. Puerto Rico should love President Trump. Without me, they would have been shut out!

Hurricane Maria hit Puerto Rico in September 2017. The storm knocked out power for 1.5 million people and it took 11 months to restore it. The island's government estimated the hurricane caused nearly 3,000 deaths.

Trump's response to the devastation on the island has been widely criticized. Congress failed to approve the aid money quickly in no small part because Trump did not want to give more relief funds to the U.S. territory.

As Democrats insisted in early May that an aid package include money for Puerto Rico's recovery, Trump tweeted that the island "should be very happy and the Dems should stop blocking much needed Disaster Relief!" In the same tweet, Trump falsely claimed that Puerto Rico got $91 billion in federal recovery funds, more than "any State in the history of the U.S." But Congress had only allocated about $41 billion to Puerto Rico at the time — well below the estimated $120 billion in aid money given after Hurricane Katrina, according to PolitiFact.

Trump tweet part 1: Puerto Rico has been given more money by Congress for Hurricane Disaster Relief, 91 Billion Dollars, than any State in the history of the U.S. As an example, Florida got $12 Billion & Texas $39 Billion for their monster hurricanes. Now the Democrats are saying NO Relief to......

Trump tweet part 2: ....Alabama, Iowa, Nebraska, Georgia, South Carolina, North Carolina and others unless much more money is given to Puerto Rico. The Dems don't want farmers to get any help. Puerto Rico should be very happy and the Dems should stop blocking much needed Disaster Relief!

Lawmakers from states hit by natural disasters had lamented the delays in passing the relief package. House Republicans stopped the measure's unanimous passage multiple times in recent weeks.

Trump and lawmakers from both major parties had seen the legislation as politically important, as states such as Iowa and Georgia will play a major role in presidential and Senate elections next year.

The disaster relief package allocates funds in part for nutrition assistance in Puerto Rico and to rebuild infrastructure on the island and throughout the states.

WATCH: Agricultural prices rise as heavy floods hit the midwest