A transit police officer who was shot and critically wounded during a gun battle between police and the Boston Marathon bombers announced his retirement Tuesday, citing the lingering effects of his injuries.

Richard Donohue Jr. nearly died during a chaotic shootout in Watertown four days after the 2013 bombing as police closed in on the suspects, brothers Dzhokhar and Tamerlan Tsarnaev. A 2015 report from Middlesex District Attorney Marian Ryan found it "highly likely" that Donohue was hit by friendly fire.

The bullet that struck Donohue severed a major artery, and he nearly bled to death. He also suffered nerve damage.

Donohue, 36, returned to work as a Massachusetts Bay Transportation Authority officer last year and was promoted to sergeant.

But Donohue said he is unable to do the job the way he had hoped to during two years of rehabilitation. He said he still has nearly constant pain in his legs.

"Unfortunately, I must now acknowledge the extent of my injuries and limitations. Physically, I cannot perform at 100 percent and must do what is right for myself, my co-workers and my department. Therefore, I will step away from the job that I love so much," he said in a statement.

Donohue said he recently accepted an adjunct professorship at a local college teaching criminal justice. He is also a board member for the American Red Cross.

Dzhokhar Tsarnaev was convicted and sentenced to death for his role in the bombings.

Tamerlan Tsarnaev died after being shot during the gun battle and run over by Dzhokhar during an escape attempt.