Malik Chavis, 23, shot two officers and then turned the gun on himself on Thursday night inside the Melrose Houses, police said. View Full Caption Facebook/Malik Chavis

BRONX — Moments after shooting two police officers in a public housing stairwell a panic-stricken Malik Chavis burst into his girlfriend’s apartment, kissed her goodbye then turned the gun on himself, according to a witness.

He died in his girlfriend's bedroom rather than face the prospect of going back to jail, according to Wanda Simes, 56, the mother of the woman he was dating who revealed the following account of Chavis' last moments.

Chavis, 23, who had served three years in state prison for attempted robbery, had been hanging out with her daughter Belinda Simes Thursday night at the family's seventh-floor home at 320 E. 156th St. about 8 p.m.

Simes was on the phone with her niece when she heard four or five gunshots near the apartment.

Simes, who was sitting in the apartment, with her daughter, two of her grandchildren, 12 and 3 years old, her niece, her niece's 7-month-old son and Chavis' friend, told everyone to take cover in one of the bedrooms.

"I was like 'what the hell is going on?' I just panicked I grabbed the kids and ran to the back because, you never know, bullets could come through the door, so I grabbed them and got to the back," she said.

That's when Chavis burst through the door with a gun in his hand.

According to police he had just shot and wounded two officers in the sixth-floor stairwell after the officers asked him for identification.

“He was upset,” Simes said. “He said, ‘I shot this b**ch. I shot a cop in the face.’”

Then Chavis started pacing the room.

“I’m dead, I’m done, I’m done, I’m done,” Chavis said, according to Simes. “I’m sorry, I’m not going to jail.'”

Chavis’ friend, who Simes only identified as Mike, tried to calm Chavis down, and told him he should ditch the gun. But when they looked out the window of the apartment, they saw scores of police officers at the entrance to the building.

Chavis led everyone into Simes' granddaughter’s room, where he kissed his girlfriend, who he had been dating since October 2015, told her he loved her and gave her his cell phone.

“I thought he was going to surrender,” she said.

Instead, Chavis, walked into his girlfriend’s room, closed the door partway and shot himself.

“We heard a bang, and then I guess [the sound of] his body falling on the floor. I think the police was in the hallway when he shot himself,” she said, adding that officers arrived soon after and told everyone to leave of the apartment.

“I said ‘don’t shoot, don’t shoot. He shot himself’,” Simes said. “Everything happened so fast.”

The injured officers, Patrick Espeut, 29, and Diara Cruz, 24, who were both on the force for about two years, suffered non-fatal wounds. Espeut was shot in the face, and Cruz was shot in the neck, torso and leg, police said. Both were taken to Lincoln Hospital.

A .32-caliber handgun and a shotgun were recovered from the girlfriend’s apartment.

Chavis has a lengthy rap sheet, including arrests for assault, attempted robbery and grand larceny. He served three years in prison for an attempted robbery and was released in November 2011, according to police.

Simes described Chavis as a “good kid.” He worked as an overnight stock worker for an Old Navy store in Bay Plaza, and has a young daughter, who is not Belinda's, she said.

“He was very nice,” Simes said. “I don’t know what happened. He was always laughing. I don’t know what happened.

“They were a happy, funny couple,” she said of her daughter and Chavis.