A man who threatened to shoot up schools if his gun rights were taken away because of the Connecticut school shooting was sentenced Thursday in Mount Vernon to three months in jail.

The Skagit Valley Herald reports 19-year-old Korry Martinson of Sedro-Woolley pleaded guilty to felony harassment in an unusual plea agreement with prosecutors.

If a mental health evaluation indicates he could pose a danger to the community, the plea will remain. But, if the evaluation yields no concerns for future behavior, he could withdraw his felony plea and plead guilty to gross misdemeanor harassment instead.

Martinson made the threat on Facebook Dec. 14, the same day as the mass school shooting in Newtown, Conn.