Updated

BUFFALO, N.Y. -- Democrats picked off a heavily Republican upstate New York congressional seat Tuesday in a special election that became a referendum on Medicare and may have blunted further GOP efforts to cut popular entitlement programs as a way to close the federal deficit.

Erie County Clerk Kathy Hochul defeated Republican state Assemblywoman Jane Corwin, capturing 47 percent of the vote to 43 percent for Corwin to win the seat in the 26th Congressional District. A wealthy tea party candidate, Jack Davis, took 9 percent.

The rural-suburban district between Buffalo and Rochester is one of New York's most conservative and has been held by a Republican -- including national names like Jack Kemp -- for years. But Corwin saw her early lead dissolve after coming out in favor of a Republican budget plan that would cut billions from Medicare, the government health plan for seniors.

Hochul's victory gave a lift to Democrats still reeling from an electoral drubbing last November that cost the party control of the House. It also bolstered their resolve to push back on GOP efforts to cut Medicare and other entitlements -- efforts that have drawn support among some tea party members but are widely opposed by independent voters.

"The three reasons a Democrat was elected to Congress in the district were Medicare, Medicare and Medicare," Democratic Congressional Campaign Committee Chairman Steve Israel, D-N.Y., said in an interview.

National leaders were quick to react.

President Barack Obama, traveling in Europe, issued a statement saying he looked forward to working with Hochul.

"Kathy and I both believe that we need to created jobs, grow our economy and reduce the deficit in order to compete with other nations," Obama said.

Vice President Joe Biden personally called Hochul to offer his congratulations.

Anticipating a tight vote, Corwin won a court order earlier Tuesday to delay certification of a winner until later in the week when absentee ballots could be counted. But with the numbers clearly in Hochul's favor, Corwin told supporters gathered at storefront in a strip mall outside Buffalo that she had conceded the race.

"The discourse of this election leaves me concerned. We cannot continue to play gotcha politics and avoid confronting the real issues facing this country," Corwin said, her voice breaking.

Hochul said she would work to balance the federal budget but refused to "decimate" Medicare.

"How about ending big handouts for Big Oil?" Hochul said. "How about making millionaires and billionaires pay their fair share?"

Her supporters at a union hall in Amherst, outside Buffalo, chanted "Medicare! Medicare!"

The seat became vacant in February when Republican Rep. Chris Lee, a married father, resigned after shirtless photos he sent to a woman he'd flirted with on Craigslist surfaced online.

The 26th Congressional District, which covers a swath of rural and suburban towns between Buffalo and Rochester, was one of only four districts in the state -- out of 29 -- that favored Republican John McCain over Obama in 2008. It's also been mentioned as a possible target of redistricting, since the state must trim two congressional districts next year as a result of the 2010 census.

But the race emerged as a test of the viability of a budget plan crafted by Republican Rep. Paul Ryan, R-Wis., that included sweeping changes to Medicare. All but a handful of House Republicans voted in favor of the budget plan and Corwin said she would have supported it as well, insisting such cuts would preserve Medicare for seniors in the future.

Hochul seized on Corwin's position and quickly cast herself as the protector of Medicare in a district with a large population of voters over 55. Her television ads hammered the issue even as Corwin tried to shift her position, suggesting she'd favor changing the Ryan plan if elected.

Both national parties and several independent fundraising groups spent more than $2 million to influence the election. They included a new Democratic group, House Majority PAC, and American Crossroads, a Republican-leaning group founded by GOP strategist Karl Rove.

For his part, Rep. Pete Sessions, the chairman of the National Republican Congressional Committee, warned that it was unrealistic to believe the race was predictive of the future. But Crossroads spokesman Jonathan Collegio said Hochul's victory was a sign of a tough time for Republicans to come.

"What is clear is that this election is a wake-up call for anyone who thinks that 2012 will be just like 2010," he said. "It's going to be a tougher environment, Democrats will be more competitive, and we need to play at the top of our game."