An Alabama police officer was killed during a drug-related shooting Friday, according to authorities.

The officer, who has yet to be named, was the sixth this year to be killed in Alabama in the line of duty.

A local task force stopped a vehicle in Hunstville as part of an ongoing drug investigation shortly before the officer was shot around 4:30 p.m.

After being stopped, the suspect fled on foot. Officers chased after him, at which point the suspect opened fire, shooting the officer in the heart despite the fact he was wearing a bulletproof vest.

Officers returned fire at the suspect before detaining him; he was uninjured.

ALABAMA POLICE OFFICER SHOT AND KILLED IN SHOOTOUT WITH SUSPECT: COPS

Authorities said they would release the name of the slain officer on Saturday. They said he was a 20-year veteran of the department. He was taken to the hospital in critical condition before he succumbed to his injuries.

Police said they had a history with the suspect, according to AL.com.

Huntsville Police Chief Mark McMurray said investigators learned of a large amount of drugs being delivered before stopping the suspect’s vehicle. He said the suspect “drew a gun and immediately fired at the officer.”

GET THE FOX NEWS APP

Numbers released by the Alabama Attorney General’s office said that six Alabama law enforcement officers have been killed in the line of duty to date in 2019.

The Associated Press contributed to this report.