Mitt Romney performed strongly in his first debate against President Obama, potentially reversing weeks in which his campaign appeared in disarray and delighting conservatives who had been openly worried about him losing badly to the president in November.

Romney’s campaign had been plagued by gaffes, particularly a video last month that showed him effectively casting 47 percent of Americans as people who want to rely on the government for their livelihood. But in the debate, the ex-governor aggressively attacked the president and defended his own record. He appeared unusually confident and eager, repeatedly interrupting both Obama and moderator Jim Lehrer to speak.

“You’ve been president four years. You said you’d cut the deficit in half. It’s now four years later. We still have trillion-dollar deficits. The CBO says we’ll have a trillion-dollar deficit each of the next four years. If you’re re-elected, we’ll get to a trillion-dollar debt,” Romney said.

Obama successfully poked holes in some of Romney’s record, most notably the former governor’s promise to reduce income taxes on most Americans but not increase the federal budget deficit or raise taxes on the middle class. Non-partisan analyses have suggested this is mathematically impossible, and Romney appeared to concede he would have to limit his tax cuts if they would balloon the deficit.

The president also pressed Romney on the lack of details on his proposals to balance the budget.

“If you are lowering the rates the way you described, Governor, then it is not possible to come up with enough deductions and loopholes that only affect high-income individuals to avoid either raising the deficit or burdening the middle class. It’s — it’s math. It’s arithmetic,” Obama said.

Overall, the president appeared to take a safe, cautious approach,  akin to a basketball team trying to run out the clock. He did not highlight Romney’s 47 percent remark, the Republican nominee’s refusal to release his tax returns or his controversial work at Bain Capital.

Obama leads in most national polls and in key swing states, and it’s not clear either candidate’s performance will alter the fundamental dynamics of the campaign, in which Obama has had a narrow but steady lead.

But Romney’s performance was more notable, as it likely end conservative carping about his candidacy and unite Republicans.

“This debate was not about zingers but about how Romney owned the stage tonight. No question he won. Period,” former Republican National Committee chairman Michael Steele wrote on Twitter after the debate, echoing the view of many conservatives. Steele has criticized Romney’s strategy sharply at times.

“Forward-looking & up for the job. Viewers got good sense of who Romney is & what he would do as POTUS,” declared former Bush adviser Karl Rove.

The candidates broke little ground on policy other than Romney’s concession that he might have to limit his tax cuts. Romney emphasized his goal to repeal “Obamacare,” which the president strongly defended. The president said tax increases on the wealthy were necessary to balance the budget, while Romney argued they would stunt economic growth. The two men dueled over who would cut Medicare the most.

Romney’s camp had promised zingers, and the candidate did offer a few, but none terribly memorable.

“Mr. President, Mr. President, you’re entitled as the president to your own airplane and to your own house, but not to your own facts. All right, I’m not going to cut education funding. I don’t have any plan to cut education funding and — and grants that go to people going to college,” Romney said.

Follow Perry Bacon Jr. on Twitter at @perrybaconjr