According to law enforcement, two NYPD officers were shot while on routine patrol inside a public housing complex in the Bronx Tuesday night, but both are expected to survive.

Three officers assigned to Police Service Area 7, the unit that patrols public housing within the NYPD’s 40th and 42nd precincts, were conducting vertical patrol inside the Melrose Housing complex in the South Bronx when they saw two people in the sixth-floor stairwell at about 8 p.m., NYPD said at a Thursday night press conference.

One of the men shot at the officers, wounding two of them — one in the face and one in the abdomen, officials said. The gunman fled into a seventh-floor apartment where an acquaintance lived. According to an eyewitness, he ran to the back of the apartment, pulled out a gun and screamed, “I just shot a cop, I’m not going back to jail,” then shot himself. Officers got into the apartment and found the suspect dead of an apparent self-inflicted gunshot wound.

The other person from the stairwell turned himself in to police, but police do not believe he is connected to the shootings, sources said. Police are speaking to the other people who were inside the apartment at the time.

Officers also recovered a gun at the scene. Police were in the process of obtaining a search warrant to recover more evidence from the apartment.

The injured officers were taken to Lincoln Hospital, where they were said to be in stable condition, however, it was initially said one of the officers was critically wounded.

The officers have not been identified, but it has been confirmed that one of the officers was a male and the other a female.