WASHINGTON — Running out of time, President Obama softened his stance and signaled Wednesday that he would back a short-term deal to prevent a disastrous financial default Aug. 2, but only if a larger and still elusive deficit-cutting agreement was essentially in place. He called lawmakers to the White House in a scramble to find enough votes from both Republicans and his own party.

The president, pushing for a big compromise that would cut the nation’s budget deficit and extend the government’s tapped-out borrowing power, had threatened to veto any stopgap expansion of the nation’s debt limit. He even warned House Majority Leader Eric Cantor not to test whether he was bluffing about it in one confrontational moment last week.

Obama’s now-calibrated position, offered by spokesman Jay Carney, reflected the reality: that leaders are nearly out of time to head off unprecedented trouble. Carney said that if a divided Congress and the White House can agree on a significant deal, Obama would accept a “very short-term extension” of the debt limit to let bigger legislation work its way through Congress.

Even a few days matters, given the stakes. The government will exhaust its ability to borrow money and pay its bills come Aug. 2, an outcome that could sink the country back into recession, halt Social Security checks and other payments, send interest rates higher and erode the creditworthiness of the richest nation on earth.

At the White House, Obama met privately with Democratic leaders of the House and Senate, and then separately with House Speaker John Boehner and Cantor. All signs pointed to a legislative battle that would play out until the last minute.

The latest talks centered on one complex question: What will it take to muster enough votes from both parties to muscle legislation through the House and Senate and raise the national debt limit by the deadline?.

The divided-by-party nature of Obama’s negotiations underscored his need to get a bottom line from Democrats in both chambers and the leaders of the Republican-run House.

His challenge with fellow Democrats is to persuade them to accept changes to the popular entitlement programs of Medicare and Social Security. With Republicans, Obama is slamming into opposition from conservatives who refuse to consider tax increases. Obama wants a mixed approach of higher taxes on the wealthy and spending cuts that share the pain.

Realistically, the deadline for agreement is this week, not next week, given the time needed to craft, debate, pass and work out possible differences in legislation.

The Obama administration and Congress are also working on a backup plan to increase the debt limit if no big plan can be reached. It would allow Obama to raise the ceiling on his own unless overridden by Congress. Yet many House Republicans loathe that idea and have pledged to vote against it, raising doubts about how tenable even the fallback choice is.‘