The 85-8 vote sends the bill to the House, which plans to vote as soon as possible, said an aide to Appropriations Chairwoman Nita Lowey, a Democrat.
Senate Appropriations Chairman Richard Shelby called the agreement a "good deal." He added that he spoke to Trump and "the president said OK."
Trump’s consent came a day after he walked out of a White House meeting on public works projects with Democratic leaders, saying he wouldn’t negotiate with Democrats as long as they continued congressional investigations of his campaign, businesses and associates.
The president previously insisted that the disaster-aid bill provide more funds for beds for undocumented migrants, leading to an impasse with House Speaker Nancy Pelosi. This fight over money to address the influx of migrants at the southern border has been put off until June when Congress returns from recess.
"I have to take care of my farmers with the disaster relief," the president said at the White House. "I totally support it, I’d like to see it happen, we’ll take care of the immigration later."
Lawmakers reached agreement Thursday on the bill, H.R. 2157. Trump backed the bill after his Senate ally David Perdue of Georgia called him Thursday, according to an aide in Perdue’s office.
"House Democrats support clearing it through the House as soon as possible," Lowey spokesman Evan Hollander said in a statement. House members have already left town for a week-long recess, but the chamber could pass the bill without lawmakers present if no member objects.
Hurricanes, Floods
Southern lawmakers have been clamoring for relief for farmers in states hit by Hurricanes Florence and Michael, which wiped out timber and pecan crops in Alabama and Georgia.
The bill includes $900 million for Puerto Rico, Shelby said. It would also extend through Sept. 30 the National Flood Insurance Program, which expires at the end of the month.
For months, the major obstacle to passing the measure was Trump’s opposition to providing aid to Puerto Rico. In April, Trump told Senate Republicans that Puerto Rico squandered previous disaster assistance and should receive no more. He argued that the island is using funds to pay off its debts, a charge that Puerto Rican officials deny. An earlier version of the bill contained $600 million in nutrition assistance for Puerto Ricans but omitted other rebuilding aid.
Republicans and Democrats blamed each other for the delay in passing the bill, which has languished since December.
Senate Minority Leader Chuck Schumer said the deal shows that as long as Trump stays out of talks, Congress can function.
“On Puerto Rico we got everything we wanted," he said, noting he suggested dropping the border provisions earlier in the day.
Florida Republican Senator Rick Scott, who has been leading the effort to pass the bill, took a different view.
“This bill isn’t much different from the bill Senator Shelby proposed weeks ago. Chuck Schumer was blocking it for political purposes," he said.