By Jonathan Ernst

LANDOVER, Md. (Reuters) - A gunman opened fire on a police station in the Maryland suburbs of Washington, D.C., on Sunday, killing one officer in what authorities called an unprovoked attack before the assailant and a second suspect were arrested.

The accused gunman was wounded in the ensuing shootout with several officers outside the station but was expected to survive, Prince George's County Police Chief Henry Stawinski told reporters hours later.

The second suspect, who was believed to have accompanied the shooter but fled the scene when the gunfire began, was taken into custody about 30 minutes later following a search of the area, Stawinski said.

Neither suspect was immediately identified.

The police chief said he could offer no explanation for what might have precipitated the attack on the District 3 police station, which lies adjacent to county police headquarters in Landover, Maryland, about 8 miles (13 km) east of Washington.

"It wasn't about anything," Stawinski told reporters at a news conference outside the hospital where the slain undercover officer, Jacai Colson, 28, was declared dead. Colson, a four-year veteran of the force, had been rushed to the hospital by a fellow officer in the back of a squad car.

"This man launched an attack on a police station and engaged several Prince George's County police officers in a gunfight, to which they responded heroically," Stawinski said.

He called the late-afternoon attack unprovoked, adding: "My understanding is he opened fire on the first officer he saw and then continued that conduct as officers became aware of what was going on, and then several officers engaged him."

One eyewitness was quoted in The Washington Post as saying she heard the sound of what she thought were firecrackers outside, then looked out her window to see a man dressed in black firing a handgun at the police station.

"He fired one shot, and then he started pacing back and forth, then fired another shot," Lascelles Grant, a nurse who lives nearby, told the newspaper. Grant said she then saw police officers pouring out of the station.

Story continues

Police said the second suspect was under questioning Sunday night and no other individuals were believed to have been involved in the incident. According to the Post, authorities described the second suspect as the gunman's brother.

John Teletchea, president of the Fraternal Order of Police union local, called the fallen officer a "cop's cop."

(Additional reporting by Brendan O'Brien in Milwaukee and Frank McGurty in New York; Writing and additional reporting by Steve Gorman in Los Angeles; Editing by Jonathan Oatis, Andrew Hay and Peter Cooney)