SAN JOSE, Costa Rica -- A 16-year-old U.S. high school student was shot and killed at a Costa Rican hotel by a security guard who mistook him for a thief, authorities said Thursday.

High school senior Justin Johnston of McLouth, Kansas was shot in the chest before dawn Thursday at the La Cangreja Lodge hotel in the city of La Fortuna de San Carlos, Costa Rican police said in a statement.

The security guard, who was identified as a 34-year-old man by the last name of Guevara, has been detained, police said.

Police said the students had been sent to bed at 10 p.m. Wednesday but a group left their rooms and gone to another building on the premises. They were returning to their rooms before dawn Thursday through a desolate area when the security guard spotted them and thinking they were thieves opened fire on them.

Johnston was on a nine-day trip to the Central American nation with a dozen other students in the school's Spanish club, said McLouth School District Superintendent Steve Splichal. No other students were injured, he said. The group was accompanied by two school district sponsors.

"The district's primary concern is for the Johnston family and also for the many students and staff members who are affected by this tragedy," Splichal said in a written statement. He said the district had activated its crisis plan and that counselors would be available for students and staff.

"The safety and security of the students and sponsors is imperative to the school district," he said.

Arrangements for the other Kansas students to return early are being made by the Massachusetts educational tour group that arranged the trip.

Johnston's death was the second time a northeast Kansas student was killed while on an educational trip to Costa Rica, according to the Lawrence Journal-World.

Shannon Lucile Martin was only a few days from graduating from the University of Kansas in May 2001 when she was murdered in Golfito, Costa Rica, while walking to her residence. She had been in Golfito finishing a class project to collect rare fern samples.