EASTON, Pa. (AP) — An Alaska man has pleaded guilty to making a bogus online threat that disrupted exams and a graduation ceremony at an eastern Pennsylvania college almost two years ago.

Gavin Lee Casdorph, 21, of Anchorage pleaded guilty to one count of willfully making false threats in connection with the May 2018 threat to Lafayette College.

College officials said someone purporting to be a student with loyalty to the Islamic State threatened an attack with “pipe bombs, pressure cookers and nail bombs.” Officials said they instituted room-by-room searches, disrupting students studying for exams, and changed exam times and the graduation ceremony location.

Federal authorities alleged that the defendant was involved in a dispute with fellow players of an online game.

Defense attorney Caroline Goldner Cinquanto told The (Allentown) Morning Call that the maximum prison sentence is 10 years but her client will get credit for taking responsibility and that could reduce the sentence to be imposed Aug. 4.

She said Casdorph suffers from significant mental health issues that played a role in his actions and pleaded guilty “because he is genuinely sorry about the way those actions affected the faculty and students at Lafayette College.”