A teenage "Star Wars" fan is in jail after threatening to shoot a friend, who spoiled the plot.

Cops said 18-year-old Arthur Charles Roy became enraged after a Facebook friend revealed plot points, reported TMZ.

Authorities say Roy, who lives in Helena, Montana, sent his friend a photo of himself, with a gun threatening to go to the friend's school and shoot him.

The incident occurred Thursday and the school was on lockdown the next day. Roy was arrested later that day.