Mr. Romney’s victory there was no surprise. He held a double-digit lead in the polls going into Tuesday.

But Mr. Manchin’s and Mr. Tomblin’s races were tighter. Tuesday’s results suggested that both incumbents catered just enough to Republicans’ concerns to persuade them to keep the Democrats in office.

Mr. Tomblin, a former State Senate president who won office last year in a special election, faced Bill Maloney, a Republican and a former drilling company owner who helped develop the rescue plan in the 2010 Chilean mine disaster.

As for the Senate race, in 2010 Mr. Manchin beat John Raese, a Republican, by a large margin in a special election to fill the seat held for a half-century by Senator Robert C. Byrd, who died that year. (Mr. Manchin, who was governor when Mr. Byrd died, appointed one of his advisers to fill the seat before declaring his intention to seek it himself.)

In a reprise of that race, Mr. Manchin again defeated Mr. Raese, a wealthy businessman. Mr. Manchin had upset some in his own party by distancing himself from President Obama. He joined Republicans in charging that the Environmental Protection Agency was waging a “war on coal” with aggressive regulation. He also stayed clear of the Democratic National Convention to avoid being identified with the national ticket.

One race that drew national interest was for state attorney general. The incumbent Democrat, Darrell V. McGraw Jr., was ousted by Patrick Morrisey, a Republican lawyer and former counsel to a Congressional committee lawyer. Mr. McGraw, who had survived several close re-election contests since taking office in 1993, had drawn the ire of pro-business groups like the U.S. Chamber of Commerce for his aggressive consumer protection lawsuits against the tobacco and pharmaceutical industries. The Center for Individual Freedom, a conservative group in Virginia that has received substantial funding from Karl Rove’s Crossroads GPS, spent $1.6 million to try to unseat him.