A 17-year-old boy is facing criminal charges after threatening to shoot at a school northeast of Edmonton near St Paul, Alta., say RCMP.

Police say the teen was in a fight with another student and was asked to leave school property on Monday.

Later in the afternoon, the student received text messages from the teen who threatened to shoot at the school.

The students notified school staff, who called police.

Police said the students were already leaving school for the day and they were not in danger.

RCMP spoke with the teen along with his parents, eventually charging him with number of offences, including uttering threats.

The suspect was released on bail with strict release conditions.

He is no longer allowed to attend the school.

Police are not identifying the school.