In a most bizarre series of events, a North Dakota freshman walked in front of his class, made an apology and then shot himself with a handgun Thursday morning, Richland County authorities said.

The unidentified male was reportedly coherent as medics rushed him to a hospital, Principal Jay Townsend of Fairmont Public School, told reporters.

While authorities have yet to find out what the apology was in reference to, those familiar with the boy don’t recall him as being in any kind of trouble at the time of the shooting.

Mayor Jon Nelk told reporters that the freshman has lived in the small, rural community of 380 residents his entire life and has spent all educational years at Fairmont School.

CNN said early reports indicate that the student was transferred to a hospital in Fargo, but the mayor had no further details.

The student's grandparents grew up in the Fairmont area and his parents have lived in town their entire lives, Nelk said.

"As far as I know, he's a well-behaved, good kid," the mayor said. "We're a rural area, but guns are not commonplace."

The shooting was "an isolated incident" for the town, Nelk added.

"I'm sure when we sit down this evening and start playing it back, we'll try to figure out what could have possibly happened and why this happened," Nelk said. "It's a very tight community.

"I've had a lot of conversations with parents and some students. They're quite worried and hoping that our prayers go out to the child and the family and the friends," the mayor said.

A teacher provided first-aid to the boy, and the school went into lockdown shortly after the 8:40 a.m. shooting, Townsend said.

An alert system called all parents, and school was canceled for the day, Townsend said.

School will resume Friday, when counselors will be on hand, the principal said.

"This has never happened here before," said Townsend, who has been principal of the school for five years. "This kind of situation is very rare and new to North Dakota, the community, our school and the students."