President Barack Obama greets guests after concluding a town hall on shared responsibility, April, 19, 2011 in Annandale, VA. (Bill O'Leary/WASHINGTON POST)

The Obama administration made a coordinated effort Tuesday to reassure nervous investors and a concerned American public that sharp ideological differences would not prevent the two parties from reaching an agreement in coming months over how best to close the federal budget deficit.

Addressing a town-hall-style forum at Northern Virginia Community College, President Obama said he was “hopeful” that Republicans and Democrats would set aside partisan rancor to trim $4 trillion from the budget over the next dozen years, a figure he said both sides agree is necessary to change the country’s fiscal course and protect the economy.

He spoke as his Treasury secretary, Timothy F. Geithner, made a series of television appearances designed to calm any lingering anxiety in the financial markets stemming from a leading ratings agency’s warning about the long-term health of the U.S. economy.

Geithner disagreed with Standard & Poor’s “negative” assessment of the U.S. economic outlook issued Monday and emphasized that there is an “emerging consensus on how much we have to do” to reduce the deficit, a potentially hopeful sign Obama stressed in his own public appearance.

“I believe that Democrats and Republicans can come together to get this done,” Obama told a largely friendly audience at the college in Annandale. “It won’t be easy. There are going to be some fierce disagreements. Shockingly enough, there will be some politics played along the way.”

But, he continued, “I’m optimistic. I’m hopeful. Both sides have come together before. I believe we can do it again.”

Obama’s town-hall-style event was the first of three scheduled this week, all on the theme of the country’s poor fiscal health and his plan to change it. He leaves Wednesday for California, where he will hold a forum at Facebook headquarters in Palo Alto, and then he travels to Reno, Nev.

His message aimed at the middle class — whether in trying to feel its pain over rising gas prices or pledging to preserve Social Security for coming generations — amounted to an early rehearsal of the argument he will be making in the months ahead for why he deserves a second term.

The challenge Obama faces in selling his plan — and, by extension, his reason for reelection — is evident in his sinking approval rating weighed down largely by enduring public pessimism over the economy.

In that spirit, Obama tempered his optimism Tuesday with a populist warning designed to bring the concerned students, teachers and others gathered inside the college auditorium off the sidelines for the fight ahead, not only over fiscal policy but also his reelection effort, which he has tied tightly to that debate.

“There are powerful voices in Washington. There are powerful lobbies and special interests in Washington. And they’re going to want to reduce the deficit on your backs,” Obama said. “And if you are not heard, that’s exactly what’s going to happen.”

He pledged to protect education funding and tuition credits, find savings in waste at the Pentagon and in ineffective social programs that he said members of his party must be willing to eliminate, invest more in clean-energy technology and infrastructure to help business, and ask America’s wealthiest to pay higher taxes.

Several of his ideas received applause from the commuter-college crowd, including the last.

Taking off his suit jacket and stalking the stage with mike in hand, Obama appeared at ease, even as he repeatedly defied his promise to keep his answers short.

Republicans have labeled that emerging platform as an overly burdensome government agenda at a time of fiscal and economic hardship.

In a statement issued soon after Obama’s appearance, Rep. Eric Cantor (Va.), the House Republican leader, said, “The last thing working families and small businessmen and women in the Commonwealth need is a tax hike courtesy of President Obama, especially at a time when jobs must be our focus.”

A new round of deficit-reduction talks is set to begin May 5 at Blair House, with Vice President Biden serving as the administration’s chief negotiator. On Tuesday, congressional Republicans appointed two senior anti-tax conservatives, Sen. Jon Kyl (Ariz.) and Cantor in the House, as their emissaries to the talks.

As the partisan sides took shape, Geithner sought to put the most positive gloss possible on the debate and its possible affect on the nation’s fragile economic recovery.

“If you listen very carefully now to what’s happening in Washington, you see people on both sides, Democrats and Republicans, agree with the president that we have to put in place some reforms now to bring down our long-term deficits,” Geithner said during an interview on CNBC. “That’s very important to the economy.”

The political fight will take place over how to make those cuts, as Obama acknowledged during his town-hall event.

“Even while we make sure that government lives within its means, we’ve still got to invest in the future,” he told the audience, many of whom rely on government aid to pay tuition.

Obama made his most pointed case regarding taxes, making clear he expects “millionaires and billionaires” to pay more in the years ahead to help balance the budget.

“We can’t just tell the wealthiest among us, ‘You don’t have to do a thing. You just sit there and relax, and everybody else, we’re going to solve this problem,’ ” he said, arguing that doing so would mean cuts in elementary education, health-care services for the elderly and programs for children with learning disabilities, among others.

“This is not a trade-off that I’m willing to make,” he said.

Staff writers Brady Dennis and Lori Montgomery contributed to this report.