Washington: Democrats and Republicans inched towards a deal Friday, ahead of a long weekend, to extend the US debt ceiling and avoid a crippling default that could hit the world's biggest economy within days.

As the Treasury's estimated deadline of next Thursday for the government running out of money loomed, there were glimmers of optimism in Washington that the two sides will finally compromise.

According to unconfirmed US media reports, this would include agreement to cover the $31 trillion -- and growing -- US debt for two years, meaning no repeat of the current drama before the 2024 presidential election.

To get this, Democrats would give in to Republican demands for sweeping spending limits on social safety and other domestic programs.

Pressure to reach some sort of arrangement and authorize the government to borrow more money needed for existing commitments is deepening.

According to the Treasury, next Thursday is when the government coffers could run dry -- leaving some domestic bills, and international creditors, unpaid.

More optimistic assessments give little more than a couple extra weeks before the cataclysm which would likely trigger stock market selloffs, huge job losses and recession.

With the country marking Memorial Day on Monday, members of Congress are leaving Washington on a 10-day recess. Even President Joe Biden -- to the consternation of some in his own party -- is heading to his Camp David retreat and his private home in Delaware.

Yet Wally Adeyemo, the deputy Treasury secretary, told CNN that both Biden and Republican congressional leader, Speaker Kevin McCarthy, were focused on avoiding catastrophe.

"The president decided, the speaker has said it, and we have to get something done before June," Adeyemo said. "The president is committed to making sure that we have good faith negotiations with the Republicans to reach a deal because the alternative is catastrophic for all Americans."

On Thursday, Biden had also tried to reassure the country, saying: "There will be no default."

- Hostage-taking accusation -

The debt ceiling raise is an annual accounting maneuver that usually passes with relatively little notice. It simply allows the government to keep borrowing money to pay for bills already incurred through the budget.

This year, the increasingly hard-right Republican Party has decided to turn the debt ceiling into leverage to force Biden to roll back favorite Democratic spending priorities.

Republicans call this taking responsibility for the $31 trillion national debt. The White House accuses the opposition party, which controls the House of Representatives, of taking the economy hostage.

Democratic minority leader Hakeem Jeffries slammed the Republicans from the House floor on Thursday, accusing them of risking "a dangerous default in a crisis that they've created."

Economists have spent months raising the prospect of economic catastrophe should the government default, and top military brass added their own dire prognosis Thursday, warning that the crisis would have a "significant negative impact" on troops.

"Readiness clearly would be impacted. So our large-scale exercises that we do at various training centers would probably either slow down or come to a halt in many, many cases," Mark Milley, chairman of the Joint Chiefs of Staff, told reporters.

Although members of Congress are heading home for a recess of 10 days, McCarthy has said lawmakers will get 24 hours' notice if they are required to return for a vote during the recess.

McCarthy pointed to a CNN poll out this week which showed 60 percent support for a debt ceiling hike if accompanied by cuts, although 51 percent of respondents in a new Monmouth University survey said they wanted the two issues to be separated.

"We know where our differences are, and we will continue to be at the table to try to solve this problem," McCarthy said.