RICHMOND — The drama of recounts and tiebreakers for control of Virginia's House of Delegates gave way to pledges of trust Wednesday as Republicans and Democrats agreed unanimously on how to organize the closely divided chamber.

And outgoing Gov. Terry McAuliffe (D), in jubilant remarks delivered as his final state of the commonwealth address Wednesday night, urged the lawmakers to set aside partisan differences and get things done.

Members voted 98 to 0 for Republican M. Kirkland Cox (Colonial Heights) to take over as speaker, recognizing the 51-to-49 advantage the GOP retains in the House after a fall wave election brought Democrats to near-parity.

There were not 100 votes because one Democrat was absent to tend to a family illness, and Cox carried on a tradition of not casting a vote for himself.

The House avoided an ugly showdown over power after the Democrat who lost a random tiebreaker — Shelly Simonds, who had been locked in a tie with Republican incumbent David Yancey for a district in Newport News — conceded defeat Wednesday morning and pledged not to seek a second recount.

Democrats pressed for rules changes to give them more influence on committees, and then fell into line behind Cox for the powerful role of speaker. He succeeds William Howell (R-Stafford), who retired after 15 years in the position and 30 years in the House.

Cox, 60, a 28-year House veteran, immediately called for a new era of bipartisanship.

"We are not two parties; we are one House," he said. "We cannot allow the partisanship that has infected so much of our country to distract us any longer."

In that spirit, Cox's nomination as speaker was seconded by a Democrat, Del. Luke Torian (Prince William). "You might be surprised by my rising" to speak, Torian told the House. "I don't look at the politics, I look at the man . . . I know without a shadow of a doubt that he will lead this House well."

In return, Democrats won some concessions on the rules under which the House will operate. Republicans put in writing that they will continue to observe proportional representation on committees, and extended that practice to subcommittees — meaning the newly empowered Democrats will have a greater voice in determining which bills reach the full chamber.

Before November's elections, Republicans enjoyed a 66-to-34 advantage in the House and total control over the committee process.

In a change that sounds arcane but was hailed by members as an improvement in transparency, the leadership also agreed to record votes taken in subcommittees. The change means the majority party can no longer kill bills through the anonymity of voice votes.

"That's a big win for us," said Del. Marcus Simon (D-Fairfax). "I think we've got great rules."

One concession Democrats failed to get in writing was a promise that the Republican leadership would consult with them in assigning members to committees. Majority Leader Todd Gilbert (R-Shenandoah) assured Democrats that they would be heard on such things.

"It is clear that we are in a much different posture with respect to one another than we have been in the past, and that we will continue to have to work together closely on many issues going forward," Gilbert said.

That changed environment was evident as soon as members began gathering in the House chamber for the noon opening of the 60-day legislative session. There were 19 new members — 16 of them Democrats, and 12 of them women. Amid hugs, high-fives and at least one near-escape of a baby — Democratic Del. Kathy Tran's young daughter had to be scooped up by a doorkeeper as she nearly crawled out into the hallway — the House of Delegates had a celebratory air.

When Torian rose to second Cox's nomination, House Clerk Paul Nardo at first couldn't locate him because he was sitting among the swollen Democratic ranks in what was once Republican territory.

Down the Capitol's marble hallway, there was little drama in the Senate, whose 40 members were not up for election in November. Gov.-elect Ralph Northam (D) presided over the chamber, as he will until his term as lieutenant governor wraps up at the end of the week. He will yield the gavel to Lt. Gov.-elect Justin Fairfax (D) after their inaugurations Saturday.

In the Senate gallery as a visitor, Fairfax received a standing ovation from the Senate, which Republicans control by a 21-to-19 margin. Among those who took to their feet was the Republican Fairfax defeated in November, state Sen. Jill Holtzman Vogel (R-Fauquier). Northam's wife, Pam, was also recognized in the gallery as "first lady-elect." Northam jokingly informed her from the rostrum that she was moving to Richmond soon and needed to pack her bags.

Senate Majority Leader Thomas K. Norment (R-James City) razzed Northam, who spent six years in the Senate before becoming lieutenant governor, over his choice of tie.

The camaraderie underlined how close Northam is to many in the legislature, and the hope that many expressed for some bipartisan cooperation.

After the House adjourned, Cox told reporters that he sees potential for bipartisan deals on opioid addiction, economic development and support for veterans, but that Republicans wouldn't back down from their conservative vision even with a slimmed majority.

Cox maintained that Medicaid expansion — the top Democratic priority — would be too costly but said he could see possible agreement on other issues surrounding Medicaid.

"Once again, I think the test when we're doing this is that we work across the aisle. Now, let's also say we are in the majority; it is 51-49. We also feel like we have a mandate," he said.

Extending health-care coverage has long been the goal of McAuliffe, who implored lawmakers to expand it in his address to the legislature.

McAuliffe also called on the General Assembly to act on other priorities that he and Northam share, such as gun safety measures, criminal justice reform, prohibiting candidates from putting campaign funds to personal use and cracking down on predatory student loans.

"None of these items are inherently political," McAuliffe said in his prepared remarks, before — much as Cox had earlier in the day — calling on the lawmakers to put aside differences and work to solve such problems.

He paid tribute to the new, more diverse look of the House of Delegates. "As I look across this room, I see many new faces. The people of Virginia, in their wisdom, have made significant changes to the composition of this General Assembly with a simple message in mind: Work together to get things done," he said.

The new legislature, he said, is an opportunity "to do things differently than they have been done in the past, and to finally break the gridlock on issues where we haven't made as much progress as we should."

Befitting a governor who made economic development the centerpiece of his administration, McAuliffe rolled out one last business announcement — the $45 million expansion of a metal manufacturing plant outside Petersburg. And he claimed credit for sparking a turnaround in Virginia's economy, with unemployment low and state revenue collections running well ahead of predictions.

But the ebullient McAuliffe also hit a somber note, paying tribute to the young woman and the two state troopers who lost their lives during last summer's white-supremacist rally in Charlottesville. He called it the lowest point of his time as governor.

"That day was full of hatred, cowardice and unspeakable loss," he said. "But as we continue to mourn their loss, I hope we will honor their legacy by finding the good in each other and in our commonwealth, even in times of great challenge."