Virginia Attorney General and Republican gubernatorial candidate Ken Cuccinelli outlines his Economic Growth and Virginia Jobs Plan at a Sweet Frog shop in Richmond, Va., May 6, 2013. (P. Kevin Morley/Associated Press)

A bill in Congress that would allow states to tax online retailers has put Attorney General Ken Cuccinelli II in a potentially tough spot as he runs for Virginia governor, pitting his usual ideological allies against the future of transportation funding in the commonwealth.

Cuccinelli (R) has not taken a public stance on the Marketplace Fairness Act, which passed the U.S. Senate by a wide margin on Monday but faces an uncertain path in the House. Cuccinelli’s campaign declined to comment Friday on his position.

The measure has divided Republicans, both nationally and in Virginia. Most conservative and anti-tax groups have opposed the bill, arguing that it will drive up prices and place a huge compliance burden on online retailers. But brick-and-mortar stores and their allies say the bill will simply even the playing field, as online retailers often avoid state taxes that physical stores have to pay.

More importantly for Cuccinelli, the measure is backed by Virginia Gov. Robert McDonnell (R) and by Cuccinelli’s November opponent, businessman Terry McAuliffe (D). The state’s congressional delegation is split on the subject.

The tax bill’s fate will play a key role in deciding where money for roads and transit in Virginia comes from going forward. The transportation bill passed by the General Assembly in February earmarks a share of future online sales tax revenue toward such projects.

Though he has said he won’t seek to overturn the transportation bill as governor, Cuccinelli has criticized the measure because it raises taxes. But in a twist that makes the issue even more complicated, if the Marketplace Fairness Act doesn’t pass, then the state’s new wholesale tax on gasoline would actually go up — from 3.5 percent to 5.1 percent.

Yet that tax increase wouldn’t be enough to compensate for the hundreds of millions of dollars in revenue that would be lost if the online sales tax measure fails.

“The net effect would be to blow a big hole in the amount of funding that would go transportation’s way,” said Michael Cassidy, president of the liberal-leaning Commonwealth Institute for Fiscal Analysis. “The backstop does not fully replace what would be lost if there’s no Marketplace Fairness Act.”

The conservative group Heritage Action, which opposes the bill and is urging lawmakers to vote against it, contends that states are hiding behind a “fairness” argument in order to wring more money out of companies and customers.

“Virginia’s tax scheme reveals the real motivation behind the Internet sales tax – the desire of states to increase tax revenue,” said Heritage Action spokesman Dan Holler. “Rather than helping brick-and-mortar businesses, politicians supporting an Internet sales tax bill are stifling small online retailers while tipping the scales in favor of big retailers.”

McAuliffe, meanwhile, wholeheartedly embraced the transportation package earlier this year and has frequently praised McDonnell for proposing it, using the topic to position himself as a bipartisan dealmaker. On Wednesday, McAuliffe wrote to Virginia’s 11 U.S. House members urging them to back the Marketplace Fairness Act.

The bill, McAuliffe wrote, will “help level the playing field for Virginia’s brick and mortar businesses as well as help ensure we have the funding we need to restore our world class transportation network and continue to collect federal matching dollars for our system.”

Virginia Sens. Mark Warner (D) and Timothy M. Kaine (D) both voted for the measure this week, and two Virginia Republicans — Reps. Morgan Griffith and Scott Rigell — are co-sponsors of the House version.

But Rep. Bob Goodlatte (R-Va.), who will have a key role in moving the bill as chairman of the House Judiciary Committee, said the bill “still has a long way to go” before he could support it. And House Majority Leader Eric Cantor (R-Va.), who helps decide which bills reach the House floor, has not taken a position on the measure.

“Congressman Cantor believes this is an issue we should address,” said Cantor spokeswoman Megan Whittemore. “Chairman Goodlatte and the House Judiciary Committee will be looking into this and we await their recommendations on next steps.”