State investigators are exploring whether a Baltimore police instructor who shot a trainee this week was not participating in a drill but horsing around when he accidentally reached for his service weapon instead of a paint-cartridge pistol, according to sources familiar with the inquiry.

Baltimore police on Thursday identified the instructor as Officer William Scott Kern, 46, an 18-year veteran on the force. City police union president Robert F. Cherry said Kern has worked in the training academy for more than a decade and his “integrity was always beyond reproach.”

Kern has been placed on medical suspension with pay as Maryland state troopers continue investigating the shooting, which critically injured a University of Maryland campus police officer who was training with city police at a shuttered state psychiatric facility in Owings Mills, Md.

According to sources familiar with the investigation, Kern was at the Rosewood Center for a training exercise when recruits peered through a window from another room. He playfully pointed a weapon in their direction, the sources said, and did not intend to harm anybody.

The shot struck the trainee — who remained in critical condition Thursday and has not been identified — in the front of the head, police said. A second officer was injured from broken glass.

Through attorney Michael E. Davey, Kern declined to comment.

The sources emphasized that the investigation is in its preliminary stages. State police said in a statement that they were receiving “full cooperation” from city police personnel but that the inquiry is expected to take weeks. The agency would not comment on the case.

State police said they will turn over their completed investigation to the Baltimore County state’s attorney, who will determine whether criminal charges are merited.

Officers’ service weapons and live ammunition are prohibited in a training environment, and it remains unclear how and why the officer had the real gun. Police use “simunition” weapons in training exercises, which have a similar feel to a service weapon but fire ammunition that is similar to a paint ball.

One source familiar with training protocols said that generally speaking, firing a shot from a “simunition” weapon in someone’s direction outside of a training exercise is against internal policies.

Cherry, the union president, said he has known Kern for the officer’s entire career and that Kern takes his job seriously.

“Regardless of where this investigation goes, no one can take away the fact that Scott Kern loves being a city police officer and approaches it with a seriousness and forthright approach we’d hope every cop would have,” said Cherry, who added that he has spoken to Kern since the incident and the officer feels remorseful.

Cherry said Kern has been working at the training academy for at least 12 years and was involved with the agency’s earlier efforts involving martial arts training.

In 1997, Kern was mistakenly charged with burglary after a crime laboratory picked up one of his fingerprints as a possible suspect print in a case that he had investigated. Officers tried to serve the warrant but realized the mistake and rescinded it.

Police Commissioner Anthony W. Batts earlier this week shut down police training academy operations and suspended six officers in the academy’s chain of command. On Wednesday, Mayor Stephanie Rawlings-Blake (D) said there was “no acceptable explanation” for the incident and said she was “so angry I was almost speechless.”

Police spokesman Anthony Guglielmi told the Baltimore Sun on Wednesday that top commanders, including the training academy commander, were not aware that the Rosewood facility was being used for city police training.

Baltimore County police say they have been using the facility for years; the state’s Department of Health and Mental Hygiene has not been able to provide any information this week about the building’s use or any agreements in place with law enforcement agencies.