NEW YORK (CBSNewYork) – Two NYPD officers were shot in Queens Tuesday afternoon.

It happened on 179th Street near Guy R. Brewer Boulevard in Springfield Gardens just before 1 p.m.

Both officers were rushed to Jamaica Hospital, where they were recovering Tuesday night.

Police say 41-year-old City University of New York peace officer Rondell Goppy opened fire first. He was shot and killed by the officers.

Watch: Mayor, Police Commissioner Discuss Shooting Of 2 NYPD Officers

Police Commissioner Dermot Shea says Goppy’s wife walked into the 105 precinct stationhouse Tuesday morning to report a domestic violence incident that took place Monday night. The dispute allegedly began with allegations of infidelity.

Rondell Goppy (Photo provided)

At around 12:40 p.m., she returned to her home with two domestic violence officers, Shea said.

According to Shea, Goppy was not home when they arrived, but he walked into the house a short time later.

“After about six minutes, he comes into the residence and starts shooting. Whether he was lying in wait or just happened to arrive at that time will be part of the investigation,” Shea said.

One of the officers was hit in the right thigh and has a fractured femur. The other officer was shot at least once and hit in both hands.

Investigators say it’s unclear right now how many shots the officers fired back at Goppy, but he died at the scene.

Goppy’s wife was not injured in the shooting.

Watch Andrea Grymes’ report —

“The police running, all the cops running to and fro, and there was cars, ambulance, everything going backward and forward,” neighbor Ione King said.

“We heard about a couple shots were fired, and then a whole bunch of police had come,” another neighbor said.

According to investigators, Goppy was a licensed gun owner.

The police commissioner says Goppy did not have a criminal history, but there were four prior domestic violence calls at the home. Shea said the fact that there were prior calls and Goppy had weapons will be part of the investigation.

As CBS2’s Andrea Grymes reports, there’s a sad irony when looking at Goppy’s social media. In 2017, he tweeted about giving out donated toys to kids affected by domestic violence.

A friend of Goppy’s came to the scene in his defense Tuesday, telling reporters Goppy was active in the community, CBS2’s Ali Bauman reports.

“I knew something was wrong with him since last Wednesday. He just didn’t seem the same,” Goppy’s friend said.

She said Goppy recently divulged to her fears of losing custody of his own two children.

“I guess he broke. He was just tired. He couldn’t take anymore,” she said. “But that’s not the person I knew.”

The officers who were injured have been with the police department 14 years and six years, respectively.

“Here you have officers who do the lord’s work. They protect survivors of domestic violence. They go into some of the most volatile, difficult situations that you can possibly imagine,” Mayor Bill de Blasio said. “They do it to protect innocent people who have been victims of abuse. And here we have a situation where a woman was in danger and these officers went in to protect her only to find themselves in harm’s way immediately. Thank God they’re going to pull through.

“Today they saved that woman’s life. I want to be crystal clear. Because those officers were there, that woman is alive, and I say God bless them,” de Blasio added.

Link: Tracking Shootings In New York City

“Those that disrespect police officers, those that want to say ‘Well let’s defund them, let’s take them out of every different type of job,’ well, here’s an example. It’s an example of a domestic dispute. It’s an example of when police walk in, they get shot at. What would happen if the police officers weren’t there?” said Police Benevolent Association President Pat Lynch. “And remember: They called us to go there. And because these two police officers put themselves at risk, professionally went to that call, there’s no one else dead.”

“An attack against one police officer is an attack against all law enforcement officers. Nassau Police share a sacred bond with members of the NYPD.  We extend our thoughts to the officers injured today and hope that they will make a full recovery.  Police officers put their own safety in jeopardy for the safety of others, and we must applaud them for the true, everyday heroes that they are,” said James McDermott, president of the Nassau County Police Benevolent Association.

A police source says at one point, those three registered guns were removed from Goppy’s home because of his domestic violence history, but the courts then returned them.

The couple does have children, but it’s unclear at this point where they were at the time of the shooting.

MORE FROM CBS NEW YORK