Before Republicans get out the champagne for victories in two gubernatorial races (New Jersey and Virginia) it might be worth looking at New York.

In a key congressional race upstate, Democrats prevailed over a conservative candidate after a more moderate Republican dropped out and cast her support Democrats' way.

The Democratic victory for a retired Air Force captain was the first for Democrats since 1871.

President Barack Obama's decision in June to appoint a Republican congressman to a Pentagon post has paid dividends.

Lawyer and retired Air Force Capt. Bill Owens won the special election Tuesday in northern New York in which the Republican candidate withdrew over the weekend under pressure from the party's right wing and GOP heavyweights endorsed the Conservative Party nominee.

Owens said he hopes to bring the heavily Republican district together after the contentious race left the GOP with one less seat in this bluest of states.

"Our challenges aren't Democratic or Republican. They're not liberal or conservative. They are American challenges that we will overcome with American resolve," Owens said in his victory speech. "The only way that we can create jobs and attract economic development to our communities is by bringing people of all parties together and giving everyone a seat at the table."

With 92 percent of the precincts reporting early Wednesday, Owens defeated businessman Doug Hoffman, the Conservative Party candidate, 49 percent to 45 percent, after a boost from unified labor efforts in the last days of the campaign.

The GOP had represented the region for more than a century. Republican John McHugh vacated the seat to become Army secretary.

Owens thanked one-time opponent Dierdre Scozzafava, a moderate Republican who exited the race Saturday after Republicans criticized her support of abortion rights and same-sex marriage and Hoffman surged past her in the polls. Scozzafava, an assemblywoman in the state legislature, picked up 6 percent of the vote herself.

The race received national attention, with some calling it a referendum on Obama and others saying it could help Republicans focus their message to attract more people to the party.

Owens defeated Hoffman despite a voter registration edge of 45,000 for Republicans and big-name endorsements for Hoffman from former vice presidential candidate Sarah Palin, former Republican Sen. Fred Thompson and others.

"This is only one fight in the battle, people," Hoffman said before a gathering of supporters in Saranac Lake, N.Y., after conceding the race. "Let's keep the fight going. Let's make sure our voices are heard."

Owens will be up for election for a full term next year.

The race took several sharp curves leading up to Election Day. It started with Scozzafava in the lead while Hoffman was considered a spoiler at best. That gradually turned around, with Hoffman leading 41-36 in a Siena poll a day before the race.

Despite the fervor that surrounded Hoffman in the final week of the campaign, Owens managed to appeal to the voters with his talk of job creation and the need for more federal support for Fort Drum and farmers.

"I don't believe the vast majority of voters in the 23rd District — be they Democrats or Republicans or independents — are looking at this as a referendum on Barack Obama or as a referendum on the Republican Party or the Democratic Party or Rush Limbaugh or any of that," he said. "I think the vast majority of voters in the 23rd are saying, `We had us a great congressman in Congressman McHugh. Which of these candidates can do a better job representing me in Washington?'"

With AP.