WASHINGTON — The Republican-led Senate on Thursday approved legislation to raise the debt limit and keep the government funded until December while providing $15 billion in disaster aid, giving a reluctant stamp of approval to the surprising deal that President Trump struck with Democratic congressional leaders.

The Senate approved the measure 80 to 17. All of the senators voting no were Republicans.

The Senate acted quickly to provide funding for the Federal Emergency Management Agency as it helps Texas recover from Hurricane Harvey, and the federal government will probably be stretched further as Hurricane Irma heads toward Florida. The House passed a measure on Wednesday providing about $7.9 billion in disaster aid, and the Senate beefed up that aid package by adding another $7.4 billion, for a total of about $15.3 billion.

“The recovery effort for a record-setting storm like Harvey has strained resources to the limit already,” said the Senate majority leader, Mitch McConnell, Republican of Kentucky. “The advance of another historic storm now makes the need for action even more urgent.”

Republican leaders had wanted a longer-term extension of the debt limit, but were left with little recourse when Mr. Trump sided with the top Democrats in Congress, Senator Chuck Schumer of New York and Representative Nancy Pelosi of California, at a White House meeting on Wednesday, blindsiding his own party.