Updated, 5:35 p.m.

The Virginia Senate passed a state budget Wednesday afternoon as two senators took U-turns — one figuratively, one literally.

The Senate voted 21-19 for the budget after Sen. Charles J. Colgan (D-Prince William) had a change of heart and voted for the two-year, $85 billion spending plan that he’d voted against on Tuesday.

Although Colgan had been pushing Gov. Robert F. McDonnell (R) for $300 million to extend Metrorail to Dulles International Airport and had said the governor had not come through with funding, he said Wednesday he had simply come to the conclusion that the need to pass a state budget outweighed the need to secure funding for the project.

“Nothing’s different,” he said when asked why his position had changed. “It’s just a new day.”

Colgan’s surprise change of heart came after most legislators had given up hope that Republicans could muster the 21 votes needed for the spending plan to be approved. Because the situation had seemed hopeless, Sen. Harry Blevins (R-Chesapeake) decided to leave early to be with his wife, who is hospitalized.

Once Colgan alerted Senate leaders of his intention vote for the plan, Blevins was contacted and asked to return to Richmond. He arrived in the chamber about 4:20 p.m. and the vote took place shortly thereafter.

Colgan, who’d wavered Hamlet-like on whether to vote for the budget after signing off on the plan worked out in a conference committee, said on Tuesday that his Democratic colleagues had convinced him it was important to take a stand on transportation funding.

But he had second thoughts Tuesday night hours after voting “nay” as he pondered the implications of not having a spending plan.

“That really got inside me,” he said.

Corey Stewart, chairman of the Prince William Board of Supervisors, gave Colgan’s arm the last twist it needed for him to vote for the budget, Colgan said.

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

Updated, 3:50 p.m.

Virginia’s troubled budget process made a breakthrough Wednesday only to hit a new snag, as Republicans got a Democrat to agree to vote with them, but then lost a GOP senator when his wife was hospitalized.

Sen. Charles J. Colgan (D-Prince William), the swing vote on the two-year, $85 billion spending plan, agreed to vote for it after renewed negotiations with Gov. Robert F. McDonnell (R), according to a senator involved in negotiations.

It was not clear what, if anything, McDonnell promised Colgan in exchange for his promise to vote on the budget, but earlier in the day, Colgan had been pressing him to commit at least some additional money to a project to extend Metrorail to Dulles International Airport.

Colgan has not had a chance to cast that vote — and it may not do much to help in any case.That’s because a Republican, Sen. Harry Blevins (Chesapeake), had to leave the session because his wife was hospitalized.

Republicans need every member of the GOP plus at least one Democrat for the budget to pass the evenly split chamber. It is not clear whether a vote will be held Wednesday.

Gov. Bob McDonnell talks about the budget impasse during an impromptu news conference outside the Executive Mansion in Richmond last month. (Bob Brown/AP)

McDonnell wrote a letter to Sen. Charles J. Colgan (D-Prince William), who had signed off on the spending plan during budget talks just before Easter but voted against it in the Senate on Tuesday.

Colgan said he has been torn between the need to pass a budget, which pays for all manner of state services, and a desire to provide funding for a project to extend Metrorail to Dulles International Airport. Democrats have pushed for $300 million for the project; the proposed spending plan includes no money for it.

On Tuesday, as he was weighing how to vote, Colgan asked McDonnell for a letter stating his support in principle to the 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.

On Wednesday, Colgan received another letter from McDonnell. It was not immediately made public, but Democratic senators who’ve seen it or been briefed on it said it boiled down to an invitation to keep talking with the governor.

The Senate has another opportunity to vote on the budget Wednesday, when the General Assembly meets to consider McDonnell’s amendments and vetoes to more than 100 bills.

The budget easily passed the Republican-dominated House on Tuesday, but failed in a 20-19 vote in the evenly divided Senate. Twenty-one senators must agree to the budget for it to pass. Lt. Gov. Bill Bolling (R), who broke many partisan ties this session, lacks authority to vote on the budget.

In other action Tuesday, the House overturned one of McDonnell’s seven vetoes, on a bill that would have increased penalties for Virginia residents who failed to register their cars in the state.

Del. Mark D. Sickles (D-Fairfax), who sponsored the bill, said that the governor, in a mad dash to deal with a mountain of legislation before deadline, apparently had misunderstood the bill to be a new tax.

“THIS IS NOT A NEW TAX,” Sickles said in a letter to the governor. “It is a potential increased sanction on law-breakers ...”

Wednesday promises to be a long day, as lawmakers act on both significant and minor changes to 130 bills and vetoes to seven bills.

McDonnell’s most substantial changes would make it easier to vote on Election Day and allow localities to spread the cost of new pension regulations over five years.

McDonnell made technical amendments to two of his education bills, including one to give tax credits to those who donate private- and parochial-school tuition to students, which Democrats warned would undermine public education. And he narrowly altered his transportation plan, although not to add significant new funding for roads, and Del. Robert G. Marshall’s (R-Prince William) bill to ban state employees — including the Virginia National Guard and State Police — from assisting in the federal detention of U.S. citizens without criminal charges or court hearings.

As of his deadline last week, McDonnell had signed 735 bills, including those requiring that information about breast density be sent to women along with mammogram results; providing insurance coverage for families with autistic children ages 2 to 6; and repealing the state’s one-gun-a-month law. Most bills become law July 1.

Lawmakers may try to override some of McDonnell’s unprecedented seven vetoes, but it’s unclear whether they have the votes to do so.

One of his vetoes sidelined a measure that would have directed the Virginia Department of Education to develop uniform guidelines for physical education in public schools. McDonnell said the legislation was an unfunded mandate on localities and killed a similar bill last year.

Sen. Chap Petersen (D-Fairfax) asked his colleagues to override a veto of a bill that will allow those who live within home owner associations to qualify for federal tax credits by installing solar panels.

McDonnell attempted to amend two bills after his statutory deadline last week, but legislative staffers rejected them and they were not recorded.

The bills were introduced by Del. Tom Rust (HB872) and Sen. Frank Wagner (SB520) and provided for the State Corporation Commission to license and regulate public adjusters. The bills now become law.