ORLANDO, Fla. – The Orlando Police Department said Friday evening that an 18-year-old was taken into custody after pointing a gun at officers.

Investigators said two officers fired their weapons at the suspect, but the suspect was not hit. It's unclear if the suspect fired back at law enforcement, but no officers were harmed.

"We never want to resort to this level, but unfortunately, we have a job to do and our job involved not only protecting ourselves, but also protecting everybody else in the community," Sgt. Eduardo Bernal said.

Police said they were called to the Palm Grove Gardens apartments just before 3 p.m. Friday after a relative reported the 18-year-old was threatening them with a gun.

In reference to the police presence at the 3900 block of WD Judge Dr, please stay away from the area. Additional information is forthcoming. pic.twitter.com/pAkrawzDnT — Orlando Police (@OrlandoPolice) October 26, 2018

Orlando police posted a video on Twitter shortly after 5 p.m. showing a Crisis Negotiations Team vehicle pulling up to what appeared to be an area of an apartment complex being blocked off by several police cruisers.

MEDIA: Please stage at Mercy Drive and WD Judge. We will update you when we can. pic.twitter.com/XsUnfZhvNk — Orlando Police (@OrlandoPolice) October 26, 2018

Detectives said when officers arrived, the 18-year-old was standing outside, and pointed a firearm at officers. Shortly after officers shot at the suspect, the suspect retreated into a neighbor's apartment unit.

Crisis negotiators and the SWAT team tried convincing the man to come outside, but investigators said officers had to force entry into the apartment to take him into custody.

"We did have two officers on scene that discharged their firearms," Bernal said. "We made numerous communication efforts to get the subject to surrender peacefully, but those communication efforts failed."

Officers have not said what kind of weapon the suspect had.

Investigators have not released the 18-year-old's identity, but he is being charged with aggravated battery on law enforcement.