. Purchase, possession or transportation of firearm by persons involuntarily admitted or ordered to outpatient treatment; penalty.
B. Any person prohibited from purchasing, possessing or transporting firearms under this section may, at any time following his release from involuntary admission to a facility, his release from an order of mandatory outpatient treatment, or his release from voluntary admission pursuant to § 37.2-805
following the issuance of a temporary detention order, petition the general district court in the city or county in which he resides to restore his right to purchase, possess or transport a firearm. A copy of the petition shall be mailed or delivered to the attorney for the Commonwealth for the jurisdiction where the petition was filed who shall be entitled to respond and represent the interests of the Commonwealth. The court shall conduct a hearing if requested by either party. If the court determines that the circumstances regarding the disabilities referred to in subsection A and the person's criminal history, treatment record, and reputation are such that the person will not likely act in a manner dangerous to public safety and that granting the relief would not be contrary to the public interest, the court shall grant the petition. Any person denied relief by the general district court may petition the circuit court for a de novo review of the denial. Upon a grant of relief in any court, the court shall enter a written order granting the petition, in which event the provisions of subsection A shall no longer apply. The clerk of court shall certify and forward forthwith to the Central Criminal Records Exchange, on a form provided by the Exchange, a copy of any such order.