GRAY — A 19-year-old man shot and killed himself in a parking lot at Gray-New Gloucester High School Saturday afternoon, the Cumberland County Sheriff’s Office said.

No one else was hurt in the incident, which took place at about 12:50 p.m., when several athletic events were going on at the school. The shooting took place near the end zone of a field that was being used for a field hockey game, said Sheriff’s Capt. Shawn O’Leary.

The sheriff’s office did not immediately release the name of the man, but said he had never attended the school and was not from the Gray-New Gloucester area.

O’Leary said the man was from the Fryeburg area and had a relationship with one of players in one of the games taking place, but he declined to be more specific.

O’Leary said school officials immediately cleared the fields and “locked down” the area, then called in sheriff’s deputies.

He said the games and other events at the school, including Saturday night’s homecoming dance, were canceled.