In December, Virginia announced it would no longer honor concealed-carry handgun permits from 25 states. Now thanks to a bipartisan deal with the governor, that legislation won't got into effect on Feb. 1st. Here’s why. (Ashleigh Joplin/The Washington Post)

Gov. Terry McAuliffe and Republican leaders will announce Friday they have reached a deal on Virginia’s gun regulations in a surprising moment of compromise on an issue that had threatened to poison the remainder of the governor’s term in office.

McAuliffe (D) agreed to legislation that says the state must recognize concealed-handgun permits from nearly all states — a reversal of Attorney General Mark R. Herring’s decision last month to sever the reciprocity rights of gun owners in 25 states.

In exchange, Republicans softened their stances on issues that have long been non-starters in the GOP-controlled General Assembly. Under the deal, the state would take guns away from anyone who was under a two-year protective order for domestic-violence offenses. And State Police would have to attend all gun shows to provide background checks for private sellers if they requested the service.

“This is a bipartisan deal that will make Virginians safer,” McAuliffe spokesman Brian Coy said. “It also demonstrates that Democrats and Republicans can work together on key issues like keeping guns out of dangerous hands.”

The agreement marks the first break in a logjam over gun rights and gun control marked by heated rhetoric and could bolster McAuliffe’s legacy as he begins the second half of his term.

“Bipartisanship requires give-and-take by both sides,” said Matt Moran, a spokesman for House Speaker William J. Howell (R-Stafford). “This agreement restores reciprocity for law-abiding Virginians while sending a clear signal about domestic violence. There’s a lot to like here.”

Both sides framed the deal as a win for Herring (D), whose decision on concealed-carry reciprocity motivated both sides to hammer out a deal.

Herring said he was glad to provide the momentum for an apparent compromise but reserved judgment on the legislation, which is still working its way through the General Assembly.

“I’m encouraged to finally see a bipartisan conversation about how we can reduce gun violence and keep guns away from dangerous individuals that shouldn’t have them,” he said. “At the end of the day, the measure of success for this package will be whether the final product that emerges from the legislative process makes Virginians safer.”

Last month, Herring said he was enforcing a Virginia law that says the attorney general must review reciprocity agreements with other states. If lawmakers pass and McAuliffe signs a series of bills changing state law as part of the deal they plan to announce Friday, Herring would have to adhere to a new set of laws.

As political leaders applauded a rare bout of consensus, reaction from activists was mixed. The National Rifle Association had panned Herring’s move last month but applauded McAuliffe and GOP lawmakers for coming to an agreement.

“The National Rifle Association commends leaders in the Commonwealth for moving forward on a bipartisan package that will benefit Virginia citizens,” Chris W. Cox, executive director of NRA’s Institute for Legislative Action, the organization’s lobbying arm, said in a statement.

But the Coalition to Stop Gun Violence reacted bitterly in a message on its Facebook page. The group said McAuliffe has bragged about “his administration’s aggressive new approach to confronting the National Rifle Association.”

“Now he’s preparing to cave to them,” the message said. “As far as we are aware, there is not a single gun violence prevention advocate in Virginia who was informed about this deal before it was done. We all stand in opposition to it.”

That’s just the sort of rancor that McAuliffe’s public safety secretary, Brian J. Moran, and state Sen. Bryce E. Reeves (R-Spotsylvania) said they strived to avoid as they quietly negotiated a compromise taking into account diverging personalities and political realities.

The pair traded messages and phone calls at all hours, starting two weeks ago around the time when lawmakers returned to Richmond for the legislative session.

A key moment came Tuesday night when the tentative agreement appeared ready to unravel. Reeves, Moran and two NRA lobbyists met at Rappahannock Restaurant for an oyster dinner — and to remind themselves what was at stake. In walked Secretary of the Commonwealth Levar Stoney, a McAuliffe confidant. Together they figured it out.

“Anybody who says the ‘Virginia Way’ is dead. It’s not dead. It’s alive and well,” Reeves said. “We can find compromise on the most contentious issues if we can shelve the politics and work together.”

Moran said: “This is a historic agreement for its bipartisanship. Virginians will be truly safer today than they were yesterday because of this agreement.”

The policy changes will come in the form of bipartisan legislation before the General Assembly.

A Senate panel Wednesday evening passed Reeves’s bill restoring reciprocity. It includes an amendment offered by Sen. Chap Petersen (D-Fairfax City) that says Virginia will not honor an out-of-state concealed-carry permit held by a person whose Virginia concealed-carry permit was previously revoked — a practice known as “state shopping.”

The domestic-violence bill will be carried by Sen. Janet D. Howell (D-Fairfax) and Del. Kathleen Murphy (D-Fairfax). It would require individuals subject to a permanent protective order to sell or transfer their guns within 24 hours of the judge’s order. State law currently prohibits the purchase or transport — but not possession — of guns by such individuals. Federal law prohibits all three.

Sen. John S. Edwards (D-Roanoke) and Del. L. Scott Lingemfelter (R-Prince William) are carrying the background-checks bill, which would be funded by $100,000 included in McAuliffe’s budget proposal. Unlike licensed dealers, private sellers are blocked from accessing the federal guns database to conduct background checks.