A deputy U.S. marshal was hospitalized with serious injuries after an exchange of gunfire with a man Thursday in Baltimore in which the suspect was killed, officials said.

Baltimore police said the shooting occurred about 6:15 a.m. in West Baltimore.

Police spokeswoman Lindsey Eldridge said the deputy was shot by a suspect and returned fire, killing the man.

The U.S. Marshals Service said in a statement the shooting occurred as marshals were serving an arrest warrant on a man wanted for armed robbery and attempted murder, the Washington Post reports.

The deputy marshal is recovering from surgery, officials said.