The Virginia General Assembly went out Saturday the same way it came in: with Republicans and Democrats facing a mountain of work and wrestling for power in the Senate.

The 2012 legislative session gaveled to a close with the most important task — passing a state budget — derailed by a partisan standoff over increased spending and committee assignments. Work on the two-year, $85 billion spending plan was pushed off to a March 21 special session as Gov. Robert F. McDonnell and Republican lawmakers scrambled Saturday night to salvage his agenda on transportation funding and overhauling the state employee pension system.

(See a rundown of bills passed during the Virginia General Assembly session and vote for which will
have the biggest impact.

McDonnell (R) summoned a handful of legislators to his office late Saturday afternoon, including House Speaker William J. Howell (R-Stafford) and Senate Finance Chairman Walter A. Stosch (R-Henrico). The group worked out a deal on pensions — a hybrid retirement plan for new state employees, local employees and teachers. But the governor’s plan to divert $110 million in core services to pay for transportation initiatives was derailed when on Saturday evening legislators failed to agree on exactly where the money would come from.

“In every legislative session, there are issues that need to be negotiated, and major issues that don’t get negotiated until the last day,” Sen. Ryan T. McDougle (R-Hanover) said.

Democrats, however, had a different take on the last-minute negotiations. “If you take a look at what [McDonnell] wants to accomplish, it’s kind of in shambles,” House Minority Leader David J. Toscano (D-Charlottesville) said. “We’ve had two months to work on it. . . . This is no way to govern.”

McDonnell told reporters late Saturday that he was grateful to lawmakers for their work, including reforms to the pension system, but he said he was “disappointed” a budget had not been passed.

“I’ll be reminding them about what happens if a budget does not get done very soon,” he said of the upcoming special session. “It’s very serious business for local governments, school boards, for police, for firefighters, for college boards that have to set tuition soon and a host of others that depend on certainty that we don’t have right now.”

McDonnell opened the session 60 days ago hoping his state — and perhaps his vice presidential prospects — would shine for sound budgeting, bipartisan harmony and everything else that nearby Washington does not represent.

The period will be known instead for the GOP’s takeover of Richmond, Democrats’ refusal to accept it, and a string of hot-button bills that brought national ridicule, large protests and some uncommonly frank anatomical references to what is quaintly called Mr. Jefferson’s Capitol.

The season’s winners and losers aren’t likely to be settled upon soon — especially if the lack of a budget leads to a partial government shutdown. The session’s reverberations could be felt in McDonnell’s national political future, the presidential contest and a U.S. Senate race with the potential to tip control of the chamber.

The fallout could continue into next year’s race for governor. Lt. Gov. Bill Bolling (R) took on an elevated role — tie-breaker in the equally divided Senate — as he launched his gubernatorial campaign against Attorney General Ken Cuccinelli II (R).

“Never can I recall a time in my 37 years on this floor that I’ve seen so much animosity and criticism of members of this body,” said Sen. Charles J. Colgan (D-Prince William).

He lectured Democrats and Republicans alike for failing to act like “gentlemen,” as he’d been instructed to do upon joining what was then an all-male chamber. His remarks drew a standing ovation from Senate colleagues.

Some Richmond-watchers say the contentious social legislation pushed by a handful of conservatives could turn off crucial independent voters in the swing state. Yet others say Democrats could squander that public-relations advantage with the budget stalemate they’ve precipitated.

If a budget, which funds everything from roads and schools to prisons and police, is not adopted by the start of the fiscal year on July 1, some government services could be halted. Localities facing deadlines to set budgets and tax rates said the deadlock is hurting them, and business leaders worry about the state’s image and top-notch bond rating.

On Saturday night, lawmakers approved a pension plan that establishes lesser benefits for those who are hired after Jan. 1, 2014. Their retirement benefits will be based on an average salary for the last five years of service, rather than the last three, as is the case for 70 percent of current employees. They will also get a lesser cost-of-living adjustment to their benefits.

Lawmakers also voted for McDonnell’s initiative to sell naming rights to roads and bridges, but legislators stripped any funding for his other proposals.

Legislators will return for a special session — their eighth in a decade — to finish the budget after a group of negotiators from both parties and both chambers hash out a compromise. Each additional day of General Assembly work will cost the state $20,000.

The session got underway in January with Sen. Richard L. Saslaw (D-Fairfax) and Sen. Thomas K. Norment Jr. (R-James City) claiming the title of majority leader. Republicans picked up two Senate seats in November’s election, creating a 20-20 tie in the chamber. Republicans claimed the majority because of Bolling’s power to break some tie votes. But Democrats contended that power should be shared and even made a failed attempt to get a court injunction to keep Bolling from voting on Senate organization.

Bolling, who broke more than 20 ties during the session, acknowledged he did not have the power to vote on some matters, including the budget. That eventually gave the Democrats the opportunity to flex some muscle but not until well into the session.

Conservatives had some big, early wins with McDonnell’s blessing: repealing a two-decade-old law limiting handgun purchases to one per month; allowing state-funded private adoption agencies to reject gay applicants for religious or moral reasons; and approving a tax credit for private-school vouchers for poor and middle-class students.

But midway through the session, conservatives lost momentum, starting when controversy erupted around a bill requiring women to get an ultrasound before an abortion. The ultrasound bill had passed both houses and McDonnell had vowed to sign it when national political commentators started lampooning one aspect of it: In most cases, the ultrasound would not be the familiar “jelly-on-the-belly” variety, but the sort involving a vaginal probe.

At the height of the controversy, with legislators comparing the procedure to state-sponsored rape, McDonnell asked that the proposal be weakened to require only the external ultrasound.

After that, conservatives suffered other losses, including bills that would have allowed home-schooled children to play public-school sports, required participants in a welfare-to-work program to get drug testing and defined a fertilized egg as a person .

“We’re disappointed,’’ said Donald Blake, president of the Virginia Christian Alliance. But Blake said he isn’t surprised considering the Senate makeup and interference by McDonnell, who had warned legislators in his own party to limit their socially conservative legislation and focus on job creation and the state budget.

As a result, the most important legislative session of McDonnell’s term came and went without his setting the agenda. He introduced 75 bills, including on jobs and transportation, but attention came largely from the measures that didn’t originate from him.

Several of his most high-profile education proposals — repealing a 30-year law that sets the first day of school after Labor Day and eliminating tenure-style protections for teachers — died. But he succeeded in passing bills that strengthen penalties for some crimes, ease life for veterans and streamline government.

The fate of most of McDonnell’s most aggressive goals remain uncertain because they are embedded in the budget, including pumping $230 million into the state’s colleges and universities.

With Bolling not being able to vote on the budget, Democrats found themselves with newfound power. Using the threat of a budget stalemate for leverage, they renewed their campaign for power sharing in the chamber. They asked to have more Democrats added to committees and to have the powerful Senate Finance Committee co-chaired by a Republican and Democrat.

Republicans balked, accusing them of turning the budget process into a political power grab.

McDonnell had pushed legislators to pass a budget, speaking privately to some, writing letters to others and urging special-interest groups to do their own lobbying. His party even began broadcasting radio ads against Democratic senators across the state.

Neither side budged.

“What’s really unfortunate is — no matter what anyone says — we have really never been in this position before,’’ said House Majority Leader M. Kirkland Cox (R-Colonial Heights). “This cavalier attitude of, ‘Oh, we can get it done in April or May,’ particularly disturbs me, because people sent us up here to do a job.’’