James Stumbo and Kevin Norton pleaded guilty on July 21, 2016, related to threats made against the Pokemon World Championships. (WBZ-TV)

BOSTON (AP) — Two men who made online threats against the Pokemon World Championships and took guns and ammunition to the event last August pleaded guilty on Thursday and were each sentenced to two years in prison.

James Stumbo, of Boone, Iowa, and Kevin Norton, of Ames, Iowa, were arrested while trying to register for the Boston event. Authorities subsequently found an AR-15 rifle, a 12-gauge shotgun and nearly 300 rounds of ammunition in their car.

Stumbo, 28, and Norton, 19, changed their pleas from not guilty to guilty in Suffolk Superior Court in Boston on Thursday. They were also given two years of probation and were ordered to undergo mental health evaluations and possess no weapons once their prison terms are completed.

The men initially faced a total of five weapons charges, but that was reduced to four, two charges each. Prosecutors said they agreed to dismiss the fifth charge, unlawful possession of a high-capacity feeding device, because both the men’s weapons were unloaded and the ammunition for them was secured.

Authorities said the men posted online statements and images that could have been construed as threats of gun violence and then drove 25 hours to Boston for the video and card game competition.

In one post, Stumbo displayed an AR-15 rifle and a shotgun on his car’s trunk with the message: “Kevin Norton and I are ready for worlds Boston here we come.”

That and other statements were made during an online chat in which other participants, not Stumbo or Norton, referred to “Columbine pt 2,” ”another Boston massacre” and the “Boston bombing,” prosecutors say.

The men’s lawyers have argued the online remarks were idle chatter.

Stumbo and Norton have been in custody since their Aug. 21 arrests.

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.