RICHMOND, Ind. — A teenage suspect and police officers exchanged gunfire outside an eastern Indiana middle school Thursday morning before the boy ran inside and killed himself, authorities said.

Indiana State Police Sgt. John Bowling said no one else at Dennis Intermediate School or any officers were injured during the shooting in Richmond, which is near the Indiana-Ohio state line about 60 miles east of Indianapolis.

Authorities, including State Police, gather following a shooting at Dennis Intermediate School in Richmond, Indiana, on Dec. 13, 2018. NBC News

Police and school officials were notified that an armed person was heading to the school with the intention of hurting people, Richmond Police Chief Jim Branum told the Palladium-Item. The shooting occurred around 8:20 a.m.

Branum said officers and the teen fired shots near a school door before the boy went inside. It wasn't immediately known whether the teen was wounded by officers during the confrontation. Officials didn't immediately confirm whether the suspect was a student at the school or his age.

Bowling said the police were investigating at the school and at another site in the city.

Bowling credited a quick response by local police and school staff for preventing further tragedy.

"Local police had received information and they reacted on that very swiftly, and I think because of their swift reaction and also the swift reaction at the school that no student injuries happened," Bowling said.

Students from the school were being bused to Richmond High School for parents to pick them up.

Branum said state police would be handling the shooting investigation.