The measure was the result of a deal struck between Trump and Democratic leaders, to the consternation of many Republicans.
The House had passed the bill, 316-90, earlier in the day. The 90 lawmakers who opposed the bill were all Republicans, who had just come out of a meeting with top administration officials urging them to support the package. The Senate passed the legislation
Trump, in a surprising move, signed onto the package Wednesday
, siding with Democratic leaders Nancy Pelosi and Chuck Schumer, who proposed bundling the bills together but only with a three-month extension for the debt ceiling, essentially punting the issue until December.
Republican leaders had sought a debt limit increase for as long as 18 months.
A White House official said "the President is pleased Congress acted quickly."
"This bill will also provide funding for any necessary relief following Hurricane Irma," the official added. "By ensuring government funding for the next three months, it gives Americans the certainty they deserve and we look forward to finding a permanent solution in the months to come."
Defense hawks oppose
Conservatives weren't the only group of Republicans opposed. Another wing of GOP opposition to the package was defense hawks, who were opposed due to the three-month continuing resolution. House Armed Services Committee Chairman Mac Thornberry and 18 other Republicans on his committee voted no.
Thornberry, a Texas Republican, said after the vote that he's done voting for continuing resolutions because of their harm to the military, and that outweighed his support for the Harvey aid.
"If you look roughly, we have lost about as many service members this year in non-combat accidents as people died in Harvey," Thornberry said. "It's clear readiness is degrading, we are losing our technological advantage, the troops are under stress — a CR not only does not solve those problems, it continues to make them worse."
Seventeen senators -- all Republicans -- voted against the package Thursday, most of whom said they wanted to support emergency funds for Hurricanes Harvey and Irma but opposed the idea of raising the debt ceiling for only three months and without any spending cuts or reforms.
Angry meeting over deal
Treasury Secretary Steve Mnuchin and White House Budget Chief Mick Mulvaney attended a Friday morning session with rank-and-file House GOP members to discuss the package.
A leadership aide told CNN that it was incumbent on the President and other administration officials to advocate for the bill, given the resistance that many conservatives had about backing any debt hike, especially after GOP leaders pressed for a longer extension than the one the president agreed to accept from Democrats.
Mnuchin, according to two members in the meeting, inflamed House Republicans who opposed the bill
by urging them to "do this for me"
For his part, Mulvaney is a founding member of the conservative House Freedom Caucus
, and regularly voted against bills to increase the debt limit during his tenure in the House because he wanted spending reforms, but is now on board with the Trump administration's strategy.
Rep. Richard Hudson of North Carolina said there was an undertone of irony at the meeting due to Mulvaney asking members to vote for something he would never have voted for. Hudson said some members directly asked Mulvaney to explain statements and actions he made in the past.
If it wasn't such a serious matter, it would have been a comedy, joked Rep. Ryan Costello of Pennsylvania.
House Majority Leader Kevin McCarthy also worked to get Republicans on board for the package. "This isn't the worst day we've ever had, and we will come together," he told members, according to a source in the room.
This story has been updated.