A gunman with an AR-15-style rifle opened fire on four plainclothes police officers in an unmarked car Thursday night in West Baltimore, police said.

Two of the officers returned fire and fatally shot the man outside apartments on Winchester Street in Bridgeview-Greenlawn, reports the Baltimore Sun.

This AR-style rifle was recovered at the scene. (Photo: Baltimore PD)

This AR-style rifle was recovered at the scene. (Photo: Baltimore PD)

The Baltimore Police Department officers were drawn to the apartments by reports of gunfire. Police said the man was shooting before they arrived about 9:30 p.m., then turned his rifle on the officers.

Once shot, the gunman ran to a second floor landing in the apartments, where he was found. He had stashed the rifle, police said, in the woods behind the apartments.

Into Friday morning, police were investigating whether the tactic was an attempt to lure police. The officers weren't injured, and no other victims were found.

"Why he was firing initially? Who he was firing at? That's something we don't have the answer to," said T.J. Smith, a police spokesman.

Now it's being reported that the Baltimore field office of the FBI distributed a memo warning that members of the Black Guerrilla Family gang had discussed the possibility of ambushing officers in the wake of a recent attack in Dallas.

The memo, obtained by The Baltimore Sun, said the BGF had discussed how they could ambush law enforcement officers who were parked in side streets or alleys. The FBI determined it had received "highly credible information" that BGF members were instructed to look for opportunities to shoot white police officers.

Baltimore Police spokesman T.J. Smith said investigators looking into Thursday night's shooting are giving consideration to the information, but "are not linking this incident at this time."