A New York City police officer was shot in the arm Tuesday night by a man who was out on the streets despite an extensive criminal background, city officials said.

Officer Dennis Vargas, 32, was shot by the suspect, identified as 25-year-old Rameek Smith, after a brief foot chase that ended in a shootout, police said.

During a press conference addressing the shooting, New York City Police Commissioner Keechant Sewell described Smith as a "dangerous criminal who should not have been on the streets of the Bronx or anywhere else."

"We are extremely fortunate," Sewell added. 

NYC SOARING CRIME RATE IN FIRST MONTHS OF 2022 FUELED BY REPEAT OFFENDERS

May 11, 2022: 32-year-old police officer Dennis Vargas shot in the Bronx by career criminal. (Fox 5 New York)

New York City Mayor Eric Adams echoed the sentiment and slammed a system that allowed "a perpetrator with multiple arrests" to acquire and carry a weapon on the streets of his city. 

"Why wasn’t he in jail?" a visibly emotional Adams asked.

MAY 11, 2022: Mayor Eric Adams holds overnight press conference regarding the shooting of 32-year-old police officer Dennis Vargas. (Courtesy: @NYPDNews)

In his remarks, Adams said Smith was arrested in March 2020 for criminal possession of a firearm after he was caught jumping the turnstile of a subway station. At the time, he was on probation for a 2016 robbery on Staten Island.

"For 20 months after the arrest, he remained on the streets," the mayor said. "He finally pled guilty in December 2021." Adams said Smith was released while he awaited sentencing, and his sentencing was pushed back multiple times.

CRIME RATES KEEPING WORKERS OUT OF NYC OFFICES NOT COVID, STUDY SHOWS

"People want to ask, Why am I cracking down on fare evasions? That’s why. People want to ask why we conducted 300,000 station inspections. That’s why," the mayor continued. 

Adams, who was sworn in earlier this year, harshly criticized lenient policing policies, many of which have been pushed by anti-police groups in the city.

"The number of shootings that we are responding to every night is despicable," he said.

"We took 2,600 guns off our streets. The shooters of those guns are back on the streets just like this person is," Adams added. "Under normal circumstances, you would see a decrease in crime in the city, but the same criminals are continuing to come out in our streets committing violence over and over again."

NYC PREGNANT WOMAN ROBBED ON SIDEWALK, THROWN TO THE GROUND BY ATTACKER

"The city deserves better," he concluded.

Officer Vargas was released from Lincoln Medical Center just four hours after being shot. He was honored by a round of applause from colleagues and friends who had gathered outside the hospital.

According to the commissioner, Vargas and his partner were patrolling an area in the Bronx when they noticed Smith walking down the street. He ran off when the officers approached him.

A short time later, Smith turned and fired at the cops, hitting Vargas. The officers then returned fire and Smith was shot in the head. A gun recovered at the scene was previously reported stolen in Virginia, Sewell said.

CLICK HERE TO GET THE FOX NEWS APP 

Smith was in critical condition when he was transported to St. Barnabas Hospital, where he was later pronounced dead, Fox 5 reported.

Fox News' Lorraine Taylor contributed to this report.