PHILADELPHIA — A Taiwanese exchange student accused of threatening to "shoot up" his high school near Philadelphia has been spared additional time in prison but will be deported.

An-Tso Sun was accused of threatening to "shoot up" his high school near Philadelphia. Upper Darby Police Department via AP file

An-Tso Sun has been in custody since March after local school authorities were alerted to a threat he had made. The 18-year-old student called the talk a joke, but authorities found more than 1,600 rounds of ammunition, as well as weapons, in the home of his host family.

A federal judge Monday declined a prosecution request to sentence him to two or more years in prison for his guilty plea to a firearms-related charge but ordered his deportation. He agreed to the deportation as part of a plea agreement.

The judge cited his youth and a strong family support system. Sun's parents are actor and assistant film director Sun Peng and actress Di Ying.