A Prince George’s County police officer shot a man Sunday while searching for a suspect in an earlier shooting, the police said.

Police said a 49-year-old man was shot by the officer in Cottage City, where the officer went to look for a suspect in a shooting in Brentwood.

When police arrived on Cottage Terrace about 5 p.m. Sunday, one officer “was confronted by the armed suspect,” police said in a statement.

The officer fired, and the man was taken to a hospital, police said. No information on his condition was known immediately.