Negotiations over the national debt entered a critical phase Thursday as President Obama challenged congressional leaders to embrace an ambitious but politically painful strategy to raise revenue and make changes to popular federal retirement programs.

Top Democrats were open to the idea, and House Minority Leader Nancy Pelosi (D-Calif.) pledged her “full cooperation” after meeting with Obama and other senior lawmakers at the White House. Republicans were more skeptical, with one prominent exception — House Speaker John A. Boehner (R-Ohio).

Boehner enthusiastically endorsed Obama’s call for a far-reaching plan. Later at the Capitol, Boehner made his own pitch to reluctant Senate Republicans, arguing in a closed-door luncheon that securing the nation’s economic future requires bold action. Boehner also said he expects a deal to come together quickly — or to collapse under the weight of partisan resistance.

“He is always an optimistic man, and he was optimistic today,” said freshman Sen. Roy Blunt (R-Mo.), who served for three years under Boehner in House leadership. “I think if they can get there, they’ll get there pretty quickly — or they won’t get there.”

Obama praised the meeting as “very constructive” and said leaders would convene again Sunday “with the expectation that, at that point, the parties will at least know where each other’s bottom lines are” and will be able to “start engaging in the hard bargaining that’s necessary to get a deal done.”

Obama said the parties “are still far apart on a wide range of issues.” He continued, “But, again, I thought that all the leaders here came in a spirit of compromise, in a spirit of wanting to solve problems on behalf of the American people.”

Time to solve those problems is rapidly running out. The nation faces default on Aug. 2 unless Congress acts to raise the legal limit on government borrowing, and Republicans and Democrats alike are demanding that any increase in the $14.3 trillion debt limit be accompanied by a significant debt-reduction plan.

Senate Majority Leader Harry M. Reid (D-Nev.) warned administration officials that a deal must be sealed by the end of next week to give congressional leaders enough time to draft the legislation, submit it to congressional budget analysts and marshal the votes before the Aug. 2 deadline, aides said.

Obama and Boehner have emerged as the most enthusiastic proponents of a big deal that would save as much as $4 trillion over the next decade by overhauling the tax code and tackling all the major drivers of federal spending, including the Pentagon and health and retirement programs. But such a plan would be complicated both politically and substantively, and aides said Senate leaders in both parties are skeptical that such a deal could come together in the next few days.

Reid declined to comment on the talks when he returned to the Capitol at midday Thursday, and his Republican counterpart offered only a modest level of support.

“We had a good conversation, and the talks will continue,” Senate Minority Leader Mitch McConnell (R-Ky.) told reporters.

Two other GOP participants in the White House meeting — House Majority Leader Eric Cantor (Va.) and Senate Minority Whip Jon Kyl (Ariz.) — also expressed doubts about a big deal, according to Republican sources.

And even as Pelosi pledged to back the president’s quest for an ambitious plan to stabilize the nation’s finances, she bluntly rejected cuts to benefits for recipients of Social Security and Medicare, telling reporters: “We are not going to balance the budget on the backs of America’s seniors, women, and people with disabilities.”

Both programs would be affected under the framework Obama envisions. One option, a proposal to change the measure of inflation used to calculate Social Security payouts, could affect benefits for current retirees. Rep. Raul M. Grijalva (D-Ariz.) called that idea a deal breaker for many House Democrats. “Most of the members who have worked on this feel that if Social Security were put on the table, and Medicare, cuts in that area, that we as Democrats and progressives would be thrown under the bus,” he said.

Obama plans to meet privately with Pelosi on Friday to address rising Democratic anxiety.

In their public statements, meanwhile, Republicans appeared no more inclined to compromise. Even as Boehner voiced support for a bipartisan deal, he continued to draw a line against higher taxes.

“I’ve . . . made clear that we are not going to raise taxes on the American people, we are not going to raise taxes on the very people that we expect to re-invest in our economy,” Boehner told reporters Thursday after briefing House Republicans on his expectations for the White House meeting.

In private talks with the White House, Boehner has discussed various options for tax policy. One idea under discussion, according to aides in both parties, is a proposal to jump-start a thorough rewrite of the tax code.

Under that scenario, Republicans would agree to extend the Bush-era tax cuts for the middle class, leaving open the possibility that the Bush tax cuts that benefit the nation’s wealthiest households would expire next year. That would be a huge win for Democrats, who have long pledged to end tax breaks for the wealthy.

In return, Democrats would agree to a rewrite of the tax code that would eliminate dozens of tax breaks and use the cash to lower income tax rates, a GOP priority. But skeptical aides in both parties said it would be difficult to craft a mechanism that could force lawmakers to follow through.

Democrats are also skeptical that Republicans would agree to tax changes that would produce significant new revenue. To accept spending cuts that could exceed $3 trillion over the next decade, many Democrats want as much as $1 trillion in fresh revenue — a major concession that neither Boehner nor any other Republican has been willing to make.

Still, people briefed on talks at the White House said the big deal sought by Obama has emerged as the most popular option. In the meeting Thursday, Obama said he would not sign a small deal that fails to persuade lawmakers to raise the debt limit sufficiently to cover the nation’s bills through the end of next year. The only other option is to return to the medium-sized package that was under discussion in bipartisan talks led by Vice President Biden.

That package aimed to produce about $2.4 trillion in savings over the next decade. But it’s not clear that the Biden approach offers a safe fallback.

The Biden talks broke up when Republicans pulled out, insisting that they could not support higher taxes in any form.

Staff writer Rosalind S. Helderman contributed to this report.