WASHINGTON — Six months in office, President Barack Obama sought to rally support for sweeping health care legislation Wednesday night as Congress struggled to find agreement on a historic overhaul. He vowed to reject any measure “primarily funded through taxing middle-class families.”

At a prime-time news conference, Obama defended his decision to set a midsummer deadline for the House and Senate to act, even if it isn’t met. “I’m rushed because I get letters every day from families that are being clobbered by health care costs, and they ask me can you help,” he said.

The stakes are huge not just for everyday Americans, but also for Obama, who is putting much of his credibility on the line to gain congressional passage. His stepped-up public role comes as he faces rising criticism from Republicans, sliding public approval ratings and divisions within his party. Obama acknowledged that many people are uneasy about growing federal budget deficits and the fast-rising government debt.

He said that without a deadline for action, a recent proposal to curtail the growth in Medicare costs would not have materialized “until who knows when.” He said in the past few days, leaders in both houses had agreed to incorporate it into legislation taking shape.

Obama stepped to the microphone looking grayer than the man who ran for president and took office in January.

He said that since he moved into the White House, “we have been able to pull our economy back from the brink.” Yet, he said, “of course we still have a long way to go.” Obama didn’t say so, but unemployment is expected to remain stubbornly high for many months to come.

He moved quickly into his pitch for health care legislation, an issue that now towers above all others — and has led at least one Republican to say that it could prove to be the president’s Waterloo if the drive collapses.

“This isn’t about me. I have great health insurance and so does every member of Congress,” he said.

The president said that in addition to helping millions who lack coverage, the health care legislation is central to the goal of eventually rebuilding the economy stronger than it was before the recession that began more than a year ago.

He said Medicare and Medicaid, government health care programs for the elderly and the poor, are the “biggest driving force behind our federal deficit.” Unless they are tamed, he said to a national TV audience, “we will not be able to control our deficit. If we do not reform health care, your premiums and out-of-pocket costs will continue to skyrocket.” The president said he believed it was possible to fund more than two-thirds of the cost of health care legislation by eliminating waste and redirecting federal funds already being spent. The rest must come from higher taxes, he said.

The administration proposed last winter a plan to raise taxes on upper-income wage earners by limiting their ability to claim deductions.

Congress looked unfavorably on the proposal, and Obama said he was open to alternatives — with one notable exception.

“If I see a proposal primarily funded through taxing middle-class families, I’m going to be opposed to it,” he said.

It was not immediately clear whether the president was signaling he would accept at least some higher taxes on middle-class families as the price for winning passage.

As a candidate he vowed repeatedly that no one earning under $250,000 would face higher taxes if he won the White House.

The president stepped to the microphone as Congress labored over his call for legislation to expand health care to millions who lack it, as well as control the costs of medical care generally.

In his opening statement, he stressed the second of those two goals.

“In the past eight year, we saw the enactment of two tax cuts, primarily for the wealthiest Americans, and a Medicare prescription program, none of which were paid for.” He vowed anew that he wouldn’t sign health care legislation that wasn’t paid for, although his administration has exempted from that pledge an estimated $245 billion to raise Medicare fees for doctors.

“This debate is not a game for these Americans, and they cannot afford to wait for reform any longer,” Obama said. “They are looking to us for leadership. And we must not let them down.” Holding his 10th extended news conference, Obama was renewing a message that the White House says he cannot pound enough: making health coverage affordable and sustainable is so vital that anything less will erode the economic stability of families, businesses and even the government.

The complex work of getting bills through the House and Senate is proving difficult. Republican leaders contend Obama’s effort and the emerging bills are rushed and risky, and members of Obama’s own Democratic Party are split on how to structure and pay for a daunting overhaul.

Obama sought to get beyond that and connect with Americans — and, in turn, the White House hopes, to pressure Congress. “I understand how easy it is for this town to become consumed in the game of politics, to turn every issue into a running tally of who’s up or who’s down,” he said.

His words came as House Speaker Nancy Pelosi said Democrats have the votes to pass a massive health care bill in that chamber, prompting surprise and some criticism from conservatives within her party.

Congress is struggling to figure out how to pay for adding millions to the ranks of the insured and slowing the long-term costs of health care in the U.S.

In his comments, Obama reiterated his pledge that any bill he signs will not add to the nation’s soaring deficit. “And I mean it,” he said.

Meanwhile, a nervous public is being hit by TV ads and claims from all sides.

And other issues haven’t gone away as Obama steps before the cameras. Still looming are an economy that keeps losing jobs, wars in Iraq and Afghanistan and Obama’s January deadline to shut down the Guantanamo Bay detention facility.

He wants the House and Senate to vote on comprehensive health care bills before they break for the summer, a window that is scheduled to shut by the first week in August. That timetable is growing tenuous, though, with up-and-down developments by the day.

Obama’s approval rating stands at 55 percent, according to a new Associated Press-GfK poll, down from 64 percent in late May and early June. Some 50 percent approve of his handling of health care, but 43 percent disapprove, and that number has risen sharply since April.

With public opinion still waiting to be shaped on health care, and with the legislative details in flux, what’s clear is that people care.

Nearly 80 percent of those polled say health care is an important issue to them. Obama is seeking to extend coverage to millions who don’t have it and to hold down the long-term costs of health care. How to pay remain a complex political question.

It didn’t help the White House when the Congressional Budget Office last week said the bills moving through Congress would add to the nation’s long-term costs, not reduce them. Obama has been emphatic that he will not sign a bill that adds to the government’s deficit.

Meanwhile, unemployment is at 9.5 percent and rising.

Talk of Obama inheriting an economic mess from George W. Bush is fading, and the American public is now grading the new president.

His approval rating on handling the economy has been slipping as impatience grows.