State Police are investigating an accidental shooting at the Maine Criminal Justice Academy on Monday that left one officer hospitalized.

Police say Matthew Morrison, a 33-year-old Aroostook County corrections officer from Mars Hill, was shot in the leg by a second correctional officer, Matthew Benger, 24, from Portland, who works for Cumberland County.

The shooting took place inside a pickup truck owned by a third correctional officer, Cody Gillis, 25, of Brunswick, who also works for Cumberland County, according to a media release. The three men were attending a training program at the academy. The gun was owned by Gillis.

The shooting took place about 8 p.m as the three men were leaving the academy grounds for the evening. The gun had been stored in the console of Gillis’ truck and Benger, who was a front seat passenger, was handling the 9mm handgun at the time. Morrison was sitting in the rear seat of the truck and Gillis was driving. The incident took place in the rear parking lot of the police academy complex, located off Oak Grove Road.

Morrison was expected to have surgery on the leg Tuesday at Maine Medical Center in Portland.

State Police are reviewing the incident.