Democrats in Virginia and across the country have derided a Republican effort to change how some states award their Electoral College votes in presidential elections. But Democrats pushed nearly identical measures for years when Virginia was a reliable GOP stronghold.

Virginia now awards its 13 electoral votes to the candidate who wins the state's popular vote. The Republican bill, to be taken up this week by a Senate committee, would end the winner-take-all approach and award an electoral vote for each congressional district won, which means the state's electoral votes would be split between candidates.

President Obama carried Virginia in 2008 and 2012. But if the Republican plan had been in place, Obama would have been awarded just four of the 13 electoral votes, even though he won the popular vote statewide.

During a debate last week, Sen. Don McEachin, D-Henrico, the Democratic caucus leader in the Senate, called the Republican legislation a "sore loser" bill. But McEachin and other Democrats supported similar legislation in 2008, months before Obama became the first Democratic presidential candidate to carry the state since 1964.

Between 2001 and 2008, Virginia Democrats tried a dozen times to pass legislation that would change the way electoral votes are awarded, only to have the bills killed in committee by Republicans.

The latest Republican proposal is doomed, as well, after Gov. Bob McDonnell and a handful of Republicans joined Democrats on Friday in criticizing the change. The governor "believes Virginia's existing system works just fine as it is," a McDonnell spokesman said.

When asked why he supported the measure five years ago but not now, McEachin replied: "The two bills aren't the same. On top of that, that bill [in 2008] was not part of a Republican pattern nationwide to gerrymander and reverse the election."

The main difference between the bills is how the at-large Electoral College votes are allocated, which under the GOP proposal go to the candidate who won the most congressional districts. Democrats in past years wanted them awarded to whichever candidate won the most votes statewide.

Michigan, Ohio and Pennsylvania -- all swing states that went for Obama last year -- are considering similar proposals. If every state awarded Electoral College votes by congressional district, Romney would have won the election with 276 Electoral College votes, according to a recent University of Virginia analysis, even though Obama was credited with 51 percent of the popular vote to Romney's 47 percent.

With Virginia now cemented as a swing state, Democrats are unlikely to support changes to the Electoral College system.

"When I introduced it, it was over years and years that Virginia was never in play," said Del. Vivian Watts, D-Annandale, who proposed similar electoral changes in 2012. "So there was very little attention paid to us."