In an unexpected turn, the Democratic governor of Virginia struck a deal with Republicans to continue recognizing gun carry permits from 25 states despite the state attorney general's decision late last year to do away with the recognition.

The deal, which will be moved through the legislature and signed by Gov. Terry McAuliffe, will restore the reciprocity agreements Virginia has with dozens of states. In exchange for restoring the agreements, Republicans have agreed to prohibit those with a protective order against them from carrying a firearm during the life of the order and to staffing gun shows with state police officers specifically dedicated to performing voluntary background checks on private gun sales. The deal would also keep Virginians who can't obtain Virginia carry permits from using another state's permit to carry in Virginia.

"This is a bipartisan deal that will make Virginians safer," Brian Coy, a spokesman for the governor, told the Washington Post. "It also demonstrates that Democrats and Republicans can work together on key issues like keeping guns out of dangerous hands."

Matt Moran, a spokesperson for House Speaker William J. Howell, echoed the governor's office.

"Bipartisanship requires give and take by both sides," he told the paper. "This agreement restores reciprocity for law-abiding Virginians while sending a clear signal about domestic violence. There’s a lot to like here."

The agreement effectively overturns the unilateral action taken by Attorney General Mark Herring, a Democrat, which is set to eliminate the 25 reciprocity agreements on the grounds that the other states' standards for issuing gun carry permits were too low. A move he argued was necessary "to ensure Virginia’s law and safety standards for concealed handgun permits are applied evenly, consistently, and fairly." The Attorney General did not release a statement on the deal.

There's no word on whether the legislation will be signed by the February 1st deadline imposed by the Attorney General's original order or if Virginians will still lose reciprocity with those other states until it is signed.