A bill to change the way Virginia awards its electoral college votes, and perhaps boost Republicans’ prospects in a state that went for Barack Obama in the last two presidential elections, appears to be headed for defeat.

Gov. Robert F. McDonnell (R) and two GOP senators on a crucial committee came out against the measure Friday, apparently dooming its chances of getting to the Senate floor.

Sen. Jill Holtzman Vogel (R-Fauquier) said in an interview with The Washington Post Friday that she would not support the bill. “I think it’s not a good policy decision right now,” Vogel said.

Sen. Ralph Smith (R-Roanoke) told The Roanoke Times that he also opposes it.

McDonnell spokesman Tucker Martin wrote in an e-mail: “He believes Virginia’s existing system works just fine as it is. He does not believe there is any need for a change.”

In Virginia, as in most states, the presidential candidate who wins the popular vote receives all of that state’s electoral votes. A bill proposed Sen. Charles W. Carrico Sr. (R-Grayson County), would instead apportion electoral votes by congressional district.

If Carrico’s bill had been in place for the 2012 elections, Obama would have claimed four of the state’s electoral votes instead of all 13.

A Senate subcommittee advanced the bill this week, but with tepid support. The vote was 3 to 3 to advance the legislation to the full committee, but without a recommendation to actually pass it.

The Privileges and Elections Committee, which will hear the bill next week, is composed of eight Republicans and seven Democrats, so the loss of even one Republican vote for the measure would cause it to fail.

Errin Haines contributed to this report.