A firearms instructor was accidentally shot in the chest Wednesday while conducting a course at a Miami-Dade gun range, according to reports.

Miami-based news outlet WPLG reported the shooting took place just before 10:30 a.m. at the Trail Glades Range. The man shot was reportedly an instructor who works for U.S. Customs and Border Protection.

A person who was at the range at the time of the incident told WPLG the shooting happened in an area of the range commonly used by law enforcement officers.

“On the police range side it’s mainly Customs and Border (Protection), they come on Wednesday for practice,” the person said. “Several police officers came running over to the civilian side of the range, where the main office is, and said someone had been shot, stop shooting.”

The man was rushed to Jackson Memorial Hospital’s Ryder Trauma Center in critical condition but a CBP official later confirmed that the man died. His identity hasn’t been released but it’s believed he was in his 30s.

“A great officer, a great family, and it’s a tragic loss,” CBP spokesman Michael Silva told reporters at a news conference.

A person who was using the civilian side of the range told NBC 6 he heard screams coming from the law enforcement side before employees told everyone to cease fire.

Officials said the officer was assigned to Miami International Airport and was a firearms instructor, and said the shooting happened while he was giving a range instruction.

Miami-Dade Police officials said their homicide bureau is investigating the shooting.

“Right now our thoughts and prayers are with the family of this federal agent,” Miami-Dade Police Det. Louis Sierra said. “It is a very tragic incident, my heart goes out to this agent’s family, he was just doing his job and unfortunately he paid the ultimate price.”

The range has been in operation since the 1950 and is operated by Miami-Dade County Parks, Recreation and Open Spaces Department.