BALTIMORE (AP) -- Baltimore police officers responding to the sound of gunshots fatally shot a man who fired at them with an AR-15 style rifle, authorities said Friday.
"We're lucky we don't have four dead cops right now," Commissioner Kevin Davis said at a news conference,
There is no evidence so far that Dayten Ernest Harper ambushed the officers, Davis said.
The FBI had alerted law enforcement agencies throughout Maryland on Thursday that Black Guerrilla Family gang members had talked about ambushing police after last week's sniper attack in Dallas.
Four plainclothes officers riding in an unmarked Nissan Altima with the windows rolled down heard gunfire from a west Baltimore apartment building about 9:30 p.m. Thursday, a department spokesman said at an earlier news briefing.
The officers drove toward the sound and saw a man shooting an AR-15 style weapon. The man then fired toward the officers, who were about 50 feet away, and two officers returned fire, police said.
The man ran into a vestibule in the building, where officers eventually apprehended him.
Harper died at hospital. Davis said Harper was 35. Online records for the Baltimore man say he was 33 years old.
One officer was wearing a body camera, but did not have time to turn it on when Harper started shooting, Davis said.
The two officers who fired at Harper are on routine administrative leave. They are 16- and 6-year veterans of the department, but Davis did not identify them further.
Online court records indicate Harper was black. The shooting comes amid outrage and protests over the shootings by police of black men in Louisiana and Minnesota, and the retaliatory attack by a black sniper that killed five police officers in Dallas.
Investigators recovered several .223-caliber shell casings from the scene in Baltimore - ammunition that can penetrate patrol officers' body armor, Davis said.
"I am concerned that these firearms are so easy for bad guys to get their hands on," Davis said, referring to the rifle, which had a pistol grip handle.
"These type of firearms are all over the place," he said. "(They have) the power to reach out and touch someone from a long distance."
Court records show Harper faced charges including attempted murder in the Baltimore area between 2002 and 2011. He had three convictions, including one for armed carjacking, but in many cases, including the attempted murder case, the charges were dropped, dismissed or set aside.
Harper "was well known to law enforcement," Davis said.