BEDFORD-STUYVESANT - A police officer is recovering and a suspect is in stable condition Monday after they were injured in a shootout a day earlier in Bedford-Stuyvesant.

The incident occurred on Marcus Garvey Boulevard and Gates Avenue at around 2:30 a.m. Sunday. Police say two sergeants and an officer from the Brooklyn Borough North Crime Unit were out patrolling when they spotted a man with a gun, who led police on a foot chase. Authorities say two officers from the 79th Precinct joined the chase and there was an exchange of gunfire.

Officer John Hirschberger, 28, was struck in the thigh. He was treated at a hospital, and has since been released. Hirschberger was transferred to the 79th Precinct less than a year ago.

The 22-year-old suspect was shot in the upper back. He was transported to Kings County Hospital, where he is under arrest, and listed in stable condition.

A firearm was recovered along Gates Avenue. The suspect is charged with attempted first-degree murder of a police officer.