(f) Upon receipt of service of an extreme risk protection order, the licensing authority of the municipality where the respondent resides shall immediately suspend the respondent's license to carry firearms or a firearm identification card and shall immediately notify the respondent of said suspension. Upon receipt of service of an extreme risk protection order the respondent shall immediately surrender their license to carry firearms or a firearm identification card and all firearms, rifles, shotguns, machine guns, weapons or ammunition in their control, ownership or possession to the local licensing authority serving the order, in accordance with section 129D; provided, however, that nothing in this section or in said section 129D shall allow the respondent to:
(i) transfer any firearms, rifles, shotguns, machine guns, weapons or ammunition required to be surrendered, or surrendered, by the respondent to anyone other than a licensed dealer; or (ii) maintain control, ownership or possession of any firearms, rifles, shotguns, machine guns, weapons or ammunition during the pendency of any appeal of an extreme risk protection order; provided, however, that while the surrender of ownership pursuant to an extreme risk protection order shall require the immediate surrender of any license to carry firearms or a firearm identification card and all firearms, rifles, shotguns, machine guns, weapons or ammunition in the respondent's control or possession, it shall not require the surrender of permanent ownership rights; and provided further that, notwithstanding section 129D, if the licensing authority cannot reasonably ascertain a lawful owner of firearms, rifles, shotguns, machine guns, weapons or ammunition surrendered pursuant to extreme risk protection order within 180 days of the expiration or termination of the extreme risk protection order, the licensing authority may, in its discretion, trade or dispose of surplus, donated, abandoned or junk firearms, rifles, shotguns, machine guns, weapons or ammunition to properly licensed distributors or firearms dealers and the proceeds of such sale or transfer shall be remitted or credited to the municipality in which the licensing authority presides to be used for violence reduction or suicide prevention. A violation of this subsection shall be punishable by a fine of not more than $5,000 or by imprisonment for not more than 2 1/2 years in a house of correction or by both such fine and imprisonment.(i) Upon the expiration or termination of an extreme risk protection order, a licensing authority holding any firearms, rifles, shotguns, machine guns, weapons or ammunition that have been surrendered pursuant to this section shall return any license to carry firearms or firearm identification card and all firearms, rifles, shotguns, machine guns, weapons or ammunition requested by a respondent only after the licensing authority of the municipality in which the respondent resides confirms that the respondent is suitable for a license to carry firearms or a firearm identification card and to control, own or possess firearms, rifles, shotguns, machine guns, weapons or ammunition under federal and state law. Not less than 7 days prior to expiration of an extreme risk protection order, a licensing authority holding any firearms, rifles, shotguns, machine guns, weapons or ammunition that have been surrendered pursuant to this section shall notify the petitioner of the expiration of the extreme risk protection order and the return of a license to carry firearms or firearm identification card and the return of any firearms, rifles, shotguns, machine guns, weapons or ammunition to the respondent.
As soon as reasonably practicable after receiving notice of the termination of an extreme risk protection order by the court, a licensing authority holding any firearms, rifles, shotguns, machine guns, weapons or ammunition that have been surrendered pursuant to this section shall notify the petitioner of the termination of the extreme risk protection order and the return of a license to carry firearms or firearm identification card and the return of any firearms, rifles, shotguns, machine guns, weapons or ammunition to the respondent.