WASHINGTON -- Days away from a default crisis, the U.S. Senate dashed on Thursday to wrap up work on a debt ceiling and budget cuts package that overwhelmingly cleared a House vote, aiming to send it to U.S. President Joe Biden's desk to become law before the fast-approaching deadline.

Senate Majority Leader Chuck Schumer said the chamber was digging into the bill that Biden negotiated with Speaker Kevin McCarthy and would "keep working until the job is done."

He warned of a crush of ideas from senators anxious to revise the bill's budget cuts and environmental policy changes, but said, "There is no good reason, none, to bring this process down to the wire."

Passage in the Senate will require cooperation between Democrats and Republicans, much the way the narrowly divided House was able to approve the compromise late Wednesday night. Fast action is vital if Washington is to meet next Monday's deadline when Treasury has said the U.S. will start running short of cash to pay its bills, risking a devastating default.

Having remained largely on the sidelines during much of the Biden-McCarthy negotiations, several senators are insisting on debate over their ideas to reshape the package. But making any changes at this stage seemed unlikely, and even opponents of the final deal say they will not hold it up.

Like Schumer, Senate Republican leader Mitch McConnell signaled he wanted to waste no time.

Touting the House package with its budget cuts, McConnell said Thursday, "The Senate has a chance to make that important progress a reality."

The hard-fought compromise pleased few in its entirety, but lawmakers assessed it was better than the alternative -- economic upheaval at home and abroad if Congress failed to act. Tensions had run high in the House as hard-right Republicans refused the deal, but Biden and McCarthy assembled a bipartisan coalition to push to passage on a robust 314-117 vote.

"We did pretty dang good," McCarthy, R-Calif., said afterward.

As for discontent from Republicans who said the spending restrictions did not go far enough, McCarthy said it was only a "first step."

Biden, watching the tally from Colorado Springs where Thursday he is scheduled to deliver the commencement address at the U.S. Air Force Academy, phoned McCarthy and the other congressional leaders after the vote. In a statement, he called the outcome "good news for the American people and the American economy."

Overall, the 99-page bill would make some progress in curbing the nation's annual budget deficits as Republicans demanded, without rolling back Trump-era tax breaks as Biden had wanted. To pass it, Biden and McCarthy counted on support from the political center, a rarity in divided Washington.

The compromise package restricts spending for the next two years, suspends the debt ceiling into January 2025 and changes some policies, including imposing new work requirements for older Americans receiving food aid and greenlighting an Appalachian natural gas line that many Democrats oppose. It bolsters funds for defense and veterans, and cuts back new money for Internal Revenue Service agents.

Raising the nation's debt limit, now US$31.4 trillion, ensures Treasury can borrow to pay already incurred U.S. debts.

Top GOP deal negotiator Rep. Garret Graves of Louisiana said Republicans had fought for budget cuts after the past years of extra spending, first during the COVID-19 crisis and later from Biden's Inflation Reduction Act, with its historic investment to fight climate change paid for with revenues elsewhere.

But Republican Rep. Chip Roy, a member of the Freedom Caucus helping to lead the opposition, said, "My beef is that you cut a deal that shouldn't have been cut."

For weeks negotiators laboured late into the night to strike the deal with the White House, and for days McCarthy had worked to build support among skeptics. Aides wheeled in pizza at the Capitol the night before the vote as he walked Republicans through the details, fielded questions and encouraged them not to lose sight of the bill's budget savings.

The speaker faced a tough crowd. Cheered on by conservative senators and outside groups, the hard-right House Freedom Caucus lambasted the compromise as falling well short of the needed spending cuts, and they tried to halt passage.

Ominously, the conservatives warned of possibly trying to oust McCarthy over the issue.

One influential Republican, former President Donald Trump, held his fire: "It is what it is," he said of the deal in an interview with Iowa radio host Simon Conway.

Before the House vote, Democratic leader Hakeem Jeffries said it was up to McCarthy to turn out Republican votes in the 435-member chamber, where 218 votes were needed for approval.

As the tally faltered on an afternoon procedural vote, Jeffries stood silently and raised his green voting card, signaling that the Democrats would fill in the gap to ensure passage. They did.

"Once again, House Democrats to the rescue to avoid a dangerous default," said Jeffries, D-N.Y. "What does that say about this extreme MAGA Republican majority?" he said about the party aligned with Trump's "Make America Great Again" political stance.

On the final vote hours later, Democrats again ensured passage, leading the tally as 71 Republicans bucked their majority and voted against the bill.

The nonpartisan Congressional Budget Office said the spending restrictions in the package would reduce deficits by $1.5 trillion over the decade, a top goal for the Republicans trying to curb the debt load.

In a surprise that complicated Republicans' support, however, the CBO said their drive to impose work requirements on older Americans receiving food stamps would end up boosting spending by $2.1 billion over the time period. That's because the final deal exempts veterans and homeless people, expanding the food stamp rolls by 78,000 people monthly, the CBO said.

Liberal discontent ran strong, too, as nearly four dozen Democrats broke away, decrying the new work requirements for older Americans, those 50-54, in the food aid program.

Some Democrats were also incensed that the White House negotiated into the deal changes to the landmark National Environmental Policy Act and approval of the controversial Mountain Valley Pipeline natural gas project. The energy development is important to Sen. Joe Manchin, D-W.Va., but many others oppose it as unhelpful in fighting climate change.

------

AP White House Correspondent Zeke Miller, AP writers Mary Clare Jalonick, Seung Min Kim and Jill Colvin and video journalist Nathan Ellgren contributed to this report