A gunman was arrested after ambushing and attempting to kill police officers in Bronx, New York.

Robert Williams walked into the Bronx police station and fired shots before 8 a.m. on Sunday, leaving one officer injured.

Lt. Jose Gautreaux was shot in the arm, and was rushed to Lincoln Hospital, where he is in stable condition. Another police officer also received treatment for minor injuries.

Williams, who is described as a “career criminal,” was released on parole in 2017 for an attempted murder charge in 2002. Williams shot someone, after carjacking a woman, then crashed the vehicle, and got into a shootout with police officers.

NYPD is also interviewing a woman in connection with the precinct shooting on Sunday morning, but not as a suspect.

“It is only by the grace of God and the heroic actions of those inside the building that took him into custody that we are not talking about police officers murdered inside a New York City police precinct,” said New York City Police Commissioner Dermot Shea in a press conference.

Commissioner Shea said the precinct attack “should outrage all New Yorkers.” He blamed the recent anti-police protests for fostering an anti-police environment.

“Just remember these things are not unrelated. We have people marching in New York City last week and I condemned it and I condemn it right here again today, using profanities against the Police Department,” Commissioner Shea warned.

“Everyone should be speaking out against this, and you have to be careful about the words you use whether it’s on social media or on written papers or speaking because words matter and words affect people’s behavior. And here we have New York City police officers, twice in 12 hours, targeted,” said Commissioner Shea.

Watch:

The Bronx precinct shooting on Sunday came after an attack the night before involving Williams. He fired shots into a police patrol van before 8:30 p.m. on Saturday. Officer Paul Stroffolino was grazed with a bullet in his chin and neck, but fortunately, he didn’t get seriously injured.

Stroffolino got applause from fellow police officers as he was released from the hospital Sunday.

Watch:

The Sergeants Benevolent Association, which is made up of 13,000 active and retired sergeants of the NYPD, tweeted to Mayor Bill de Blasio on Sunday, expressing their anger for the mayor’s lack of support, and blaming him for the two shootings.

“Mayor DeBlasio, the members of the NYPD are declaring war on you! We do not respect you, DO NOT visit us in hospitals. You sold the NYPD to the vile creatures, the 1% who hate cops but vote for you. NYPD cops have been assassinated because of you. This isn’t over, Game on!” tweeted SBANYPD.

President Trump remarked how the New York City police are under assault because of NYC’s “weak leadership” of Mayor Bill de Blasio and Governor Cuomo.