Police Capt. Randy Dickerson said a school resource officer heard a gunshot shortly before 8 a.m. The student was found dead in a hallway, he said.
"It doesn’t appear that anyone else was in danger or threatened," Dickerson said.
The junior high school and a nearby elementary school were locked down and classes canceled for the day, authorities said. The name of the student was not released, pending notification of next of kin.
Kenny Monday told The Associated Press that he’d just dropped off his son, Kennedy, when he heard about the incident. Monday said his son heard the gunshot but did not witness the shooting.
"It’s so sad that the kid lost his life, but we’re just glad he didn’t shoot anyone else," Monday said.
Stillwater Junior High sent a statement to parents saying there had been a "single shooting incident" at the school and that staff and students — eighth and ninth graders — had been moved to a safe location. Parents were told to pick up their children at a nearby shopping center.
"Everyone thought it was a joke at first," ninth-grader Ashlyn Lundholm told the Stillwater NewsPress. "Then I heard people screaming. Then we went to lockdown for 35 to 40 minutes."
Dickerson told the NewsPress that "the hallway was probably full of kids that time of day."
Superintendent Ann Caine said counselors would be available for students.
"It is with a heavy heart that I inform you of a tragic incident at our (school) this morning," Caine said in a letter to parents. "At 7:50 a.m. one of our students died as a result of a self-inflicted gunshot wound. All other students and staff are safe."
Stillwater is located about 70 miles west of Tulsa.