MADISON, Wis. - President Barack Obama narrowly won Wisconsin and its coveted 10 electoral votes Tuesday night, while Democratic U.S. Rep. Tammy Baldwin won election in the most expensive U.S. Senate fight in state history.

Obama carried Wisconsin and beat Republican Mitt Romney despite the presence of Wisconsin congressman and Janesville native Paul Ryan on the GOP ticket. Baldwin topped longtime former Republican Gov. Tommy Thompson in a race to replace retiring Democratic Sen. Herb Kohl that remained close deep into the night.

Romney had hoped to deliver the state for the GOP for the first time since 1984. But the president emphasized Wisconsin in the waning days of the tight race, making three visits in five days that including a stop Monday in Madison with rock star Bruce Springsteen.

"We're all quite stunned at the results because we had such an energized based, the independents were falling our way," said Republican state Sen. Alberta Darling, co-chair of Romney's Wisconsin campaign. "People were coming out of the woodwork to help. Maybe we were just not dealing with the real reality."

All seven incumbents in the U.S. House won re-election, and Democrat Mark Pocan won the seat being vacated by Baldwin. All 99 members of the state Assembly and half of the state Senate were also on the ballot.

According to an exit poll conducted for The Associated Press, Obama had strong support from women and blacks, while Romney led among men. Obama also was clearly preferred by voters under age 40, college graduates and those with family incomes under $50,000. Romney had strong backing from voters in their 40s and 65 and older, those with family incomes of at least $100,000 and Protestant and other Christian voters.

About half of those surveyed said they had a favorable opinion of Ryan, including one in eight who said they voted for Obama. Four in 10 said they had an unfavorable view of Ryan, who easily won re-election to his U.S. House seat in southeastern Wisconsin.

Ryan cast his ballot in Janesville early Tuesday with his wife, Janna Ryan, at a local library. Their three children, Liza, Sam and Charlie, watched as their parents cast their votes.

Republican National Committee Chairman Reince Priebus, who lives in Kenosha County, said he voted at a polling place in Somers and felt good about what GOP campaign workers have been able to accomplish.

"We have done, I think, the Romney campaign, the volunteers here and across the Midwest I think just an incredible job of party ID, getting out the vote, identifying who your voters are and then using the technology, the manpower and the people to get the job done and find these folks a way to get to the polls," Priebus told WISN-AM in Milwaukee.

Cari Herling, a Sun Prairie insurance agent, said she voted for Obama, just as she did four years ago.

"I just feel (Obama) has such integrity. I trust him," said Herling, 44. "I don't think Romney understands people who are down and out. ... I believe (the problems of) the last four years weren't just Obama. I believe Obama walked into a mess."

Wisconsin was among a shrinking number of battleground states in the waning weeks of the campaign, leading to multiple visits by the candidates and their surrogates. While Obama brought Springsteen, and Bob Dylan predicted his landslide at a Monday concert, Ryan tailgated with Green Bay Packers fans Sunday and stopped in Milwaukee on Monday night.

The only other statewide race was for Kohl's U.S. Senate seat, which Democrats have held since 1957.

With temperatures in the 30s and light flurries falling, 34-year-old warehouse clerk Chris Pfeifer emerged from his Madison polling station inside a library that's part of a suburban strip mall. Pfeifer voted for Baldwin.

"She's been a really good representative for the district," Pfeifer said. "I think Tommy's had his chance already."

Pfeifer described the Senate campaign as "vicious" and said he was glad it was over.

Dave Zeman, a 60-year-old doctor from Madison, voted for Thompson, saying he agreed more with his policies than with Baldwin's.

"I do think his ad is pretty close, that Tammy Baldwin is arguably more liberal than Nancy Pelosi," Zeman said, referring to one of the numerous attack ads in the race attempting to label Baldwin as a liberal extremist.

Ryan and his four fellow Republican congressmen in Wisconsin — Jim Sensenbrenner, Tom Petri, Sean Duffy and Reid Ribble — all easily won re-election Tuesday. Two Democratic incumbents also won re-election, and Pocan won in Baldwin's seat to keep it under Democratic control.

In the Legislature, Republicans looked well on their way to reclaiming the majority in the state Senate and with it complete control of state government.

Republicans needed to oust at least one Democratic incumbent or win an open seat in far northeastern Wisconsin and protect four GOP incumbents. According to returns tabulated by The Associated Press, the GOP captured the open seat and three of the four incumbents had won their races as of late Tuesday evening.

The GOP was widely expected to retain control of the state Assembly, where Republicans held a 59-39-1 edge going into Election Day. The GOP already controls the governor's office; if it captures the Senate and holds the Assembly it will have free rein of state government.

Those wins, coupled with Ryan's ascendance as Romney's running mate, provided some solace for sullen Republicans. But juxtaposing those with losses at the top of the ticket left them searching for answers.

"It's a paradox," said Darling, who herself survived a recall election last year. "I'm baffled."

___

Associated Press writers Todd Richmond in Sun Prairie, Philip Elliot in Janesville and Gretchen Ehlke in Milwaukee contributed to this report.

___

Follow Scott Bauer on Twitter at http://twitter.com/sbauerAP.