RICHMOND — Virginia’s General Assembly wrapped up its 60-day session Saturday without passing a budget or expanding Medicaid, leaving Gov. Terry McAuliffe’s biggest priority in limbo and raising the specter of a protracted standoff that could shutter state government.

McAuliffe (D) called on the House and Senate to return to the Capitol in two weeks to continue work on a two-year, $96 billion budget to fund schools, universities, local governments and other state services.

But there was little optimism that the special session would lead to a quick resolution of the budget stalemate, which turns on whether to expand Medicaid under the federal health-care law known informally as Obamacare.

As McAuliffe and a bipartisan majority in the Senate are bent on expansion and the GOP-dominated House remaining staunchly opposed, legislators were bracing for a drawn-out showdown — one that could threaten state services if it is not resolved by July 1, the start of the new fiscal year.

With the General Assembly’s most important task undone unfinished, Saturday made for an unsatisfying conclusion to a session that began 60 days earlier with the optimism of an incoming governor who had run for office as a bipartisan dealmaker.

“While we have proven that we are capable of working together for the common good on many issues, I am disappointed that politics have deadlocked budget negotiations this session, and forced Virginia families to continue to wait until we can bring their money back to expand much-needed health coverage across the Commonwealth,” McAuliffe said in a letter to the General Assembly.

House Republican leaders, who blame the impasse on Democrats’ insistence on Medicaid expansion, skipped the usual visit to the governor’s Capitol office after they declared the session done.

“That’s a ceremonial, traditional type of thing when you finish your business. We haven’t finished our business,” House Speaker William J. Howell (R-Stafford) said, noting that Senate leaders had bowed out as well because they were heading to a memorial service for a former colleague.

But the General Assembly still managed to come together on its final day to rein in, if only partially, the limitless cash culture that has long pervaded Virginia politics. Legislators will still be allowed to accept unlimited campaign contributions, but certain gifts will be capped at $250 a year under a compromise reached Saturday.

As originally proposed, the bill would have capped individual gifts at $250 but would not have prevented someone from giving a succession of $250 gifts to a lawmaker. After criticism, both sides agreed Saturday to amend the bill to impose a $250 annual limit on gifts from any lobbyist or entity that secures the services of a lobbyist. Additionally, the cap would apply to an individual or organization who has or is seeking a state contract.

That’s a significant shift from the current law, which allows officeholders to accept gifts of any size as long as they report any worth more than $50.

The bill, which also closes a loophole that allows gifts to immediate family to go unreported, was prompted by a scandal that led to the indictment of former governor Robert F. McDonnell (R) and his wife, Maureen, about two weeks into the session.

At the same time, the chambers agreed Saturday to scrap a key provision that would have blocked the kind of financial maneuvering that federal prosecutors allege Maureen McDonnell undertook to evade disclosure requirements. Originally, the proposal would have required lawmakers to report stock sales and transfers above a certain threshold, not just the ownership of stocks at a particular time. (McDonnell sold and repurchased stock between December 2011 and January 2012, enabling her to avoid disclosing the stock at the time reports were due.)

Senators argued that it would be onerous for lawmakers with complex stock holdings, and the House went along.

The ethics legislation also failed to put limits on so-called intangible gifts, including meals, transportation and trips, including one last year to the Masters golf tournament in Augusta, Ga.

Del. Matthew James (D-Portsmouth) said the legislation was a good compromise. Last year, James joined other lawmakers on a trip to Augusta National Golf Club, which was paid for by Virginia power giant Dominion.

“We were just asking questions about upcoming legislation, upcoming issues in their business,” James said. As to what benefit having those conversations in Georgia had for his constituents in Virginia, James added: “You can take that down to any level. Why would it be beneficial for me to have a cup of coffee with them [at] 7:00 in the morning? What’s the benefit to that?”

As a result of a tragedy affecting one of its own, the General Assembly had come into the session unusually unified on another issue: mental health. At the start of the session, Sen. R. Creigh Deeds (D-Bath) was recovering from being stabbed by his mentally ill son, who then fatally shot himself.

Mental-health measures came together Saturday with several bills. One is intended to ensure that someone in desperate need of psychiatric care can always find a hospital bed.

Deeds called it “a significant first step, but there’s so much more to do.”

Lawmakers also finished work reforming standardized testing in schools, an issue that Republicans led on but that McAuliffe had championed on the campaign trail. They also agreed to delay for two years the A-F grading system for schools that McDonnell pushed for last year, seeking to find a way to hold schools accountable without stigmatizing them.

But partisan tensions were never far from the surface, first boiling over after two special elections allowed Democrats to seize control of the evenly split Senate. With help from Lt. Gov. Ralph S. Northam (D), who presides over the chamber and decides most tie votes, Democrats grabbed control of crucial committees — and with them the power to decide which bills live or die.

McAuliffe, new to elected office and to Richmond generally, spent much of the session trying to get to know legislators, particularly the Republicans who were wary of Medicaid expansion. Many in the GOP admired his tireless outreach, which included a vow to host “60 parties in 60 days” at the mansion.

But his charm offensive did not guarantee legislative success. Republicans leapt at the chance to make the governor squirm when he found himself caught between a major trading partner (Japan) and a campaign promise to a crucial voting bloc (Korean Americans in Northern Virginia). The House rejected the governor’s choice of Boyd Marcus, a Republican strategist who had endorsed him in the campaign, to a high-paying job on the state’s Alcoholic Beverage Control Board.

GOP House leaders publicly chided McAuliffe for a governing style they described as hands-off, a characterization the governor’s office said was inaccurate.

Knowing that there was no budget breakthrough at hand Saturday, the House and Senate made quick work of about 50 other bills before them. They made an effort to push them through rapidly with the hope that members could make it to a memorial service for former state senator Benjamin J. Lambert III, who died last week. The long-serving Richmond Democrat drew attention for endorsing George F. Allen (R) in his 2006 reelection bid for the U.S. Senate, in part for his support to historically black colleges. The next year, Lambert lost his seat to a Democratic challenger, A. Donald McEachin.

The still-looming Medicaid battle put a damper on some of the frivolity that usually accompanies the last day of the session. The self-appointed House “sensitivity caucus,” which usually bestows satirical end-of-session awards on legislators, gave none out this year. Del. Terry G. Kilgore (R-Scott), the comedic brain behind the awards, said he wasn’t in the mood because of Medicaid.

But the Senate, which typically labors under more button-downed decorum than the often-raucous House, was determined to cut loose. Sen. Bryce E. Reeves (R-Spotsylvania) brought a fresh football to replace the ones repeatedly confiscated by the Senate clerk — only to have the originals returned.

“It’s like the end of the school year, when the principal returns certain confiscated items,” Clerk Susan Clarke Schaar joked.