CHEVERLY, Md. - Police were going about their business on a Sunday afternoon when a gunman fired at the first officer he saw outside a Maryland police station, prompting a gun battle that left an undercover narcotics officer dead and the suspect wounded, authorities say.

Prince George's County Police Chief Hank Stawinski said Jacai Colson, a four-year veteran of the department only days shy of his 29th birthday, died in the "unprovoked attack" outside the station. The shooting erupted in Landover, a suburb about 10 miles northeast of downtown Washington, D.C.

Speaking at a news conference, Stawinski said that once the first shot was fired, several officers fired back at the suspect. He couldn't say how many shots were exchanged in the confrontation that began about 4:30 p.m.

"Those officers did not shrink. They bravely advanced and engaged this individual," the chief said.

Prince George's County State's Attorney Angela Alsobrooks called the shooting an "act of cowardice" and a "horrific act of evil." She promised an aggressive investigation and prosecution of the alleged shooter, who was wounded in the return fire but is expected to survive, and another suspect arrested soon after the shooting. Their names were not immediately released.

Stawinski said the second man was believed to have been present with the suspected shooter when the shots erupted, but fled and was later arrested. He gave no immediate indication what prompted the shooting.

The Washington Post reported ( http://wapo.st/1M12KZ1 ) that one woman nearby to the shooting scene grabbed her sleeping, 14-month old baby from his play pen when she heard what she thought might be either firecrackers or gunshots. The woman told the newspaper she looked outside and saw a man dressed in black firing a handgun.

"He fired one shot, and then he started pacing back and forth, then fired another shot," said Lascelles Grant, a nurse. She added in the account that police began pouring out of the station. "Just looking outside, I'm like, 'Oh my God, look at all these police officers running out, putting their lives really in danger."'

The woman couldn't immediately be reached by The Associated Press.

Immediately after the shooting, police advised residents near the police station to stay inside, and others to avoid the area, because of an "active shooter" situation. They later lifted the "shelter in place" advice in a message on Twitter soon after the second suspect was apprehended.

Alan Doubleday, assistant chief of the Prince George's County Fire and Emergency Services Department, said earlier that a person who was shot was taken by ambulance from a community centre near the police station to Prince George's Hospital Center. That person appeared to be in stable condition, Doubleday said.

He said the officer was taken to the same hospital.

Parked police cars lined road to the hospital Sunday evening. Officers crowded into the hospital's lobby waiting for news. Colson was pronounced dead at the hospital.

"The officers are devastated," Stawinksi said later.

The FBI and the Bureau of Alcohol, Tobacco, Firearms and Explosives have begun assisting local police in the investigation, spokesmen for the two federal agencies said. They said the Prince George's County Police remains the lead investigating agency.

Dave Fitz, spokesman for the FBI in Maryland, told AP that the FBI "reached out and offered support" and sent some special agents to assist. An ATF official didn't elaborate on the details of its assistance.