With time running out, Virginia House and Senate negotiators struck a deal Wednesday to overhaul transportation funding in a state long bedeviled by dwindling sources of money for roads, highways and transit.

The deal, reached three days before the annual legislative session is scheduled to end, would use an intricately connected web of tax increases and tax cuts on fuel and general merchandise to raise about $880 million a year for a transportation network strained by gridlock and starved for money.

The plan also would weaken the link that has long tied road funding to fuel consumption and divert more money from sales taxes — which also fund schools, law enforcement and other services — toward roads.

If the deal is approved, it would be the first major transportation-funding package to emerge from the General Assembly since a doomed 2007 plan. A deal also would allow Gov. Robert F. McDonnell (R) to claim a legacy of moving forward on a stubborn problem that has dominated the legislature for years. Supporters say that unlike the last major fix — when the gas tax was set at 17.5 cents per gallon in 1987 — the new revenue would keep pace with economic growth and inflation.

“This is a moment to find common ground and get results for the people of Virginia,” McDonnell told lawmakers in a written statement Wednesday. “It is why they have sent us here. Not to argue and posture, but to cooperate and solve problems.”

But the 98-page bill must get past the evenly divided Senate and GOP-led House, and both Republicans and Democrats saw things in the deal that were not to their liking. A vote may come as early as Thursday.

Del. Sal R. Iaquinto (R-Virginia Beach) said he is inclined to support the compromise because he believes it is a good way to fix transportation funding.

“I think there’s a good chance it’ll pass,” said Iaquinto, who was pleased with how Hampton Roads would fare under the proposal. “I’m encouraged.”

The deal by a 10-member conference committee would substantially cut the fuels tax but raise the sales tax from 5 percent to 5.3 percent and divert a portion of existing revenue to roads.

The plan would cut the gas tax by about a third, replacing the current 17.5 cents-per-gallon levy with a new 3.5 percent wholesale gas tax. The tax on diesel would remain about the same, but it would be converted from a flat per-gallon tax to a 6 percent wholesale tax. The new taxes on gasoline and diesel would rise with inflation.

The deal reduces the amount of general fund revenue that McDonnell and the House sought to use for roads but diverted more than the Senate had wanted.

McDonnell and the House had proposed devoting 0.75 percent of general sales tax revenue for roads, which would have generated about $283 million a year by 2018. The conferees agreed to reduce that take to 0.675 percent so that about $198 million a year would be redirected from the pot that also funds schools, police and other services. That was up from the $56 million a year the Senate had been willing to divert by committing 0.55 percent of the sales tax to transportation.

The agreement also includes Internet sales tax revenue that would flow to Virginia under the Marketplace Equity Act but provides for a contingency if Congress fails to pass it. Under the deal, 57 percent of Internet sales tax revenue, or $183 million a year, would go to transportation.

If Congress does not pass the act by January 2015, the wholesale tax on gasoline would rise from 3.5 percent to 5.1 percent.

Democrats also pushed for a guarantee that the amount to come out of the state’s general fund would drop to only $63 million if Congress fails to act on Internet taxes, Sen. Janet D. Howell (D-Fairfax) said.

In a bid to appeal to Northern Virginia and other urban areas, the deal devotes a percentage of transportation funds to rail and transit, including $300 million to extend Metro’s Silver Line to Dulles International Airport.

The plan also includes a regional component that would allow Northern Virginia and Hampton Roads to impose additional local taxes and use that revenue for only transportation projects in those areas.

Under the deal, Northern Virginia would be able to raise as much as $350 million a year and Hampton Roads at least $175 million.

The conferees agreed to set aside more sales tax revenue to education, increasing it from 1.125 percent to 1.25 percent, and raise the amount of tax paid on new car sales. The car titling tax, now 3 percent, would go up to 4.3 percent. The $100 alternative-fuel vehicle fee eliminated in the House version of the bill was restored in the compromise.

“It’s clearly an improvement on where we started in this process,” said Robert Chase, president of the Northern Virginia Transportation Alliance. “This is not a long-term fix. I think perhaps, most importantly, it doesn’t preclude us from being able to build on this in the future.”

As Republicans and Democrats began digging into fine print, both sides expressed uneasiness about the deal. For Democrats, the package would mean weakening their long-standing orthodoxy against using additional general funds on roads. They also complained that the proposal does not raise enough money to meet the state’s needs and relies too heavily on a regional approach to a statewide problem.

“Many members of our caucus are very concerned about diverting revenue from schools, public safety and health care, which are on life support right now after the last four years,” Del. Scott A. Surovell (D-Mount Vernon) said, noting that the state is now spending less on kindergarten through 12th grade than in 2007.

Surovell said the deal is not a good one for Northern Virginia, either, because the region already contributes the lion’s share of general funds that underwrite schools in the state. Now more of that money would also go to highways and other parts of the state would contribute even less to fund Northern Virginia’s transit and road construction needs due to its special tax district, he said.

Senate Minority Leader Richard L. Saslaw (D-Fairfax) called the plan “convoluted” but also said he would reserve judgment on Wednesday afternoon.

“They haven’t really eliminated the gas tax at all. They’re just collecting it in a different manner. No one should be fooled by that,” Saslaw said.

On the other side of the aisle, Republicans objected to anything that would force consumers and motorists to dig deeper into their pockets, especially now that the state is running surpluses.

“We all want a comprehensive solution to address our transportation needs, but in an attempt to cobble together enough new tax revenue to satisfy the demands of Senate Democrats, this has become a Frankenstein’s monster for Virginia taxpayers,” said Del. Ben L. Cline (R-Rockbridge), co-chairman of the Conservative Caucus.

Laura Vozzella contributed to this report.