The Virginia Senate passed a two-year $85 billion budget on Wednesday, more than a month late, as a pair of senators took U-turns — one figuratively, another literally.

The Senate’s 21 to 19 decision came after Sen. Charles J. Colgan (D-Prince William) had a change of heart and decided to vote with Republicans for the spending plan that he had voted against on Tuesday.

Colgan’s decision surprised his colleagues, many of whom had given up hope that Republicans could muster the 21 votes needed in the equally divided chamber. Word of Colgan’s decision, which brought the budget plan back to the Senate floor, led senators to summon Sen. Harry B. Blevins (R-Chesapeake) back to the Capitol for the vote. But they couldn’t reach Blevins, who had left Richmond by car to tend to his sick wife, so State Police put out an all-points bulletin for him. Blevins was flown back to the hospital after Wednesday’s vote.

Gov. Robert F. McDonnell (R) blamed Democrats for delaying the budget as they sought more power in the chamber and more funding for their priorities. The governor thanked Colgan, the longest-serving state senator in Virginia history, for his vote.

“It took the courage and the statesmanship of one Democratic senator, Chuck Colgan, to secure this outcome for the good of the citizens of Virginia,’’ McDonnell said.

Sen. Harry B. Blevins, R-Chesapeake, left, greets Sen. Charles J. Colgan, D-Prince William, the only Democrat to vote for the budget bill, which passed the Senate on April 18. Blevins had to rush back from caring for his ill wife to cast his vote. (Bob Brown/AP)

Senate Democrats had held up the budget for weeks as they fought aggressively for an additional $300 million for the extension of Metrorail to Dulles International Airport.

Colgan’s vote floored his colleagues.

“He didn’t tell us anything,” said Senate Minority Leader Richard L. Saslaw (D-Fairfax). Normally game to hold forth for the media, Saslaw had little to say, walking directly from the Capitol to the General Assembly office building without stopping to talk to reporters, who trailed him to the building. “I thought we’d do better than we did.”

Colgan, 85, said he signed off on the compromise — even though it meant bucking his own party and giving up on money to the Dulles rail project — in part because he had second thoughts Tuesday night after voting “nay.”

He said he pondered the implications of not having a spending plan. “That really got inside me,” he said.

Corey A. Stewart, the Republican chairman of the Prince William Board of County Supervisors, gave Colgan’s arm the last twist it needed.

“ ‘We need that budget,’ ” Colgan said Stewart told him Wednesday. “That kind of reinforced what I was thinking.”

Colgan, a former World War II pilot, had decided before each of his past three elections that he was going to retire, but he was persuaded to run each time by Democratic leaders, including former governor Timothy M. Kaine and Sen. Mark R. Warner. A moderate Democrat and committed Catholic, he sometimes crosses party lines to vote with Republicans, particularly on abortion issues, but he has been a stalwart Democratic vote on fiscal issues.

The spending plan the Senate approved Wednesday did not include the Dulles rail money but pumps tens of millions more into local governments, public schools, hospitals and nursing homes than the original proposal.

State employees, college faculty and some local government workers would get a one-time 3-percent bonus in December and a 2-percent raise in 2013 if revenue remains at projected levels.

The Republican-led House of Delegates overwhelmingly passed the bill Tuesday, paving the way for the new budget to go into effect at the start of the fiscal year, July 1, a relief to state and local agencies. McDonnell will have seven days after receiving the budget to recommend amendments.

“We remain hopeful that we can find a solution to the funding dilemma on the Dulles Toll Road and provide toll relief to the families who will face high, skyrocketing tolls without additional assistance from the commonwealth,’’ House Democratic Caucus Chairman Mark D. Sickles (Fairfax) said.

The budget breakthrough came on the day the General Assembly weighed McDonnell’s changes to 130 bills and seven vetoes unrelated to the budget.

Legislators rejected McDonnell’s recommendations to weaken a contentious voter ID bill, scrapping provisions the governor had added to allow local elections officials to compare signatures if voters did not have proper identification. But they agreed to allow localities to spread the cost of new pension regulations over years.

But most of the attention Wednesday focused on the state budget, which pays for everything from prisons to road maintenance and colleges.

“It was probably not one of the masterpieces that we’ve painted in the legislative process, but ultimately it came out as a recognizable portrait,” said Senate Majority Leader Thomas K. Norment Jr. (R-James City).

The spending plan came just in time. School budgets must be adopted May 1 and county budgets by June 30, the end of the state’s fiscal year.

On Tuesday, as he was weighing how to vote, Colgan also had asked McDonnell for a letter stating his support in principle to the Dulles rail project. McDonnell produced a letter, one that satisfied Colgan. But Colgan’s Democratic colleagues persuaded him to vote against the budget anyway because they thought the governor’s tone in the letter was “a bit testy,” Colgan said.

McDonnell sent another letter to Colgan on Wednesday that simply confirmed support for the Dulles rail project, but did not promise additional money. That was enough for Colgan.

Senate Republicans needed at least one Democratic vote in the evenly divided chamber to approve the budget. Lt. Gov. Bill Bolling (R) can break tie votes, but not when it deals with the budget.

Legislators tried, but failed, to override several vetoes, including one that would have increased penalties for Virginia residents who failed to register their cars in the state and another that would have allowed those who live within homeowner associations to qualify for federal tax credits by installing solar panels. 

They agreed to technical amendments that would gives tax credits to those who donate private- and parochial-school tuition to students, which Democrats said would undermine public education. Lawmakers also voted to tweak the governor’s transportation plan, but added no new funding.