CHARLESTON, W.Va. (AP) — A Democrat who was once the favorite for governor of West Virginia struggled to overcome weeks of Republican attack ads in a special election Tuesday that was seen as a referendum on President Barack Obama and his health care plan.

Acting Gov. Earl Ray Tomblin and GOP candidate Bill Maloney vied to finish out the final year of a term left vacant by Joe Manchin, a well-liked governor who stepped down after he won a U.S. Senate seat. The race narrowed in recent weeks and was fraught with negative ads from both sides. The national parties spent millions of dollars on each campaign.

With 15 percent of precincts reporting, Tomblin led Maloney by several thousand votes, according unofficial results.

Tomblin, a veteran state lawmaker, fended off questions about his mother's greyhound breeding business and efforts to tie him to Obama that said Tomblin should have joined with a majority of other states who sued the administration over the health care plan.

Obama lost West Virginia in 2008 and remains wildly unpopular here, but Tomblin hoped for a replay of last year's U.S. Senate special election, when Manchin beat back efforts to tie him to Obama.

The link to the president resonated with Mark Gingerich, who voted for Maloney, a millionaire businessman and former drilling company executive who has promised to bring more jobs to the state.

"I think it's important right now to have a conservative Republican governor because the states are going to have to do something together to do away with Obamacare, the socialized medicine," Gingerich said.

The Obama ads featured images of the president floating on the screen with Tomblin. One spot asks: "What's Gov. Tomblin doing about Obamacare? Absolutely nothing."

Tomblin, meanwhile, used ads to blame Maloney for sending jobs to Pennsylvania when the drilling firm he co-founded moved there. But the relocation came four years after Maloney sold his shares in the company.

Of at least 21 spots that aired, 15 were attack ads.

The negative ads turned Dushyant Shekhawat against Maloney.

"He's not fighting against Tomblin; he's fighting against Obama. That I don't like. He should concentrate his run against Tomblin," said Shekhawat, a federal employee at the National Energy Technology Laboratory.

Tomblin campaigned as the rightful heir to Manchin. He said together they helped shape policies that created pain-free balanced budgets and revenue surpluses at a time when other states continued to struggle during the recession.

But Tomblin isn't as well known as Manchin, who resigned during his second term.

"For a lot of people, they've only known him in the few months that he's been acting as governor. That factor makes him almost an unknown equal to Maloney being an unknown," said Marybeth Beller, a political science professor at Marshall University. "The commercials have taken such a negative tone, that the only information that a lot of people are getting are the negative side."

Tomblin drew a contrast between himself and Obama by saying West Virginia was far more economically sound than the country. The state has an unemployment rate below both the national rate and also has begun gradually cutting both business and consumer taxes, while improving its Wall Street credit rating and emergency reserves, points frequently noted by Tomblin's campaign.

Like Manchin, Tomblin sparred with tougher coal mining regulations from the Obama administration, keeping up a lawsuit the former governor filed against the Environmental Protection Agency's handling of permits.

Tomblin has represented the heart of the southern coalfields as a legislator since 1974, and the mining industry has long been crucial to the state's economic health. West Virginia's Coal Association endorsed Tomblin, and the energy sector was his chief source for campaign cash.

Election officials expected light turnout, which favored Republicans in a state where Democrats outnumber the GOP by nearly 2-to-1.

"In a low turnout election, the Democratic advantage in West Virginia goes away," said political science Professor James White of Concord University. "The race is tighter than expected, there's no doubt about that."

Republicans angled for an outcome similar to last month's upset in a New York City special congressional election, in which Obama's favorability loomed large.

"We don't want Tomblin back in there," said retiree Janet Varney, who along with her husband voted for Maloney. "We just believe he will follow Obama's policies — and we don't agree with Obama's policies."

While West Virginia has had a Democratic governor for the last decade, it has not elected a governor from the southern part of the state since the 1960s. The GOP seized on the region's reputation for political corruption in this race.

Both Maloney and the Republican Governors Association, which has spent at least $3.4 million attacking Tomblin since late August, used ads to make an issue of a greyhound breeding business run by his mother. They claimed Tomblin wrongly diverted money to a state fund that benefits greyhound breeders.

Tomblin said the breeder with the fastest dogs, not state officials, determines who reaps the proceeds.

Richard Farley, of Morgantown, is a registered Republican. He said he was torn until the last minute.

"It was a rough one because I had a choice between Maloney, who stands for nothing, and Tomblin, who — well, I can't support anyone who's ever been involved in gambling," he said.

"Unfortunately, I had to go with Maloney," Farley said. "I personally don't see him getting re-elected. But I can't personally see supporting someone who made money off of gambling."

The Obama-themed ads turned him off, too.

"I'm not sure what the president has to do with the gubernatorial race in West Virginia. That's kind of a non-issue," he said.

Maloney, a political newcomer, focused on the state's high poverty ranking and touted his experience as an employer. He vowed to take West Virginia in a new direction by aggressively targeting its tax structure, regulatory policies and court system. He also campaigned on his contribution to the rescue plan that freed the 33 trapped Chilean miners last year, saying he provided drilling expertise.

Tomblin and America Works USA, bankrolled by the Democratic Governors Association, targeted Maloney over whether his businesses have paid their taxes on time and enjoyed tax credit policies that Maloney has criticized in the campaign. America Works devoted at least $2.4 million to negative ads.

Tomblin also touted endorsements from groups ranging from the National Rifle Association and the state Chamber of Commerce to the United Mine Workers union and West Virginia AFL-CIO.

Tuesday's winner will have to resume campaigning almost immediately to keep the seat: It's up again in 2012 for a full four-year term.

___

Associated Press writer Vicki Smith in Morgantown and Pam Ramsey and John Raby in Charleston contributed to this report.