New York (CNN) A pair of New York police officers shot and wounded while responding to an armed robbery in the Bronx were going off-duty and probably not wearing their bulletproof vests, police officials said Tuesday.

In fact, Andrew Dossi, Aliro Pellerano and three other officers were changing clothes at the end of a dangerous anti-crime detail when they ran out of a Bronx station house to search for two robbery suspects, officials said. The suspects were arrested Tuesday.

"Chances are they weren't wearing their vests," Chief of Department James O'Neill told reporters. "They were going home. They jumped into a car and they ended up getting into this fierce firefight."

The alleged shooter was identified as Jason Polanco, a 24-year-old boxer who was charged with five counts of attempted murder of a police officer and was said to have posted anti-police and anti-government statements on social media, police said. His alleged accomplice, Joshua Kemp, 28, was arrested on robbery charges.

The wounded officers spent Tuesday at St. Barnabas Hospital in the Bronx. One of them, Dossi, who is 30 and has eight years on the job, was in stable condition following surgery after being shot in the arm and lower back, according to police. The other, Pellerano, who is 38 and has nine years as an officer, is in stable condition with gunshot wounds to the chest and arm.

"Last night a team of our officers displayed extraordinary bravery, going above and beyond the call to protect their fellow New Yorkers," Mayor Bill de Blasio, who has found himself at odds with some in his police force in recent weeks, said in a statement Tuesday. "We thank these officers for their commitment to serving our city, including answering the call after their shift had ended. ... This incident was yet another reminder of how profoundly important the work of our police officers is, as well as the seriousness of the dangers they face every day in the line of duty."

De Blasio also thanked New Yorkers who provided more than two dozen tips that helped identify the gunman. Police said 10 of the tipsters identified Polanco by name.

Monday night, authorities located the white Camaro that two suspects carjacked a block from the shooting, as well as a .44-caliber revolver, but no one was inside the vehicle.

Before Polanco was arrested, police offered a $12,000 reward for information leading to a bearded man pictured in a surveillance video from inside a take-out Chinese restaurant moments before the shooting. Police said he was the man who shot at the officers. Polanco entered the restaurant and bought a bottle of iced tea before coming out firing at the officers who stopped his alleged accomplice outside, police said.

One of the suspects, as seen in a Chinese restaurant moments before the shooting

'Extraordinarily brave'

The call about an armed robbery at a Bronx grocery store came in around 10:30 p.m. Monday, as five plainclothes officers were coming off their shift.

Rather than going home, the police went to look for the criminals, something de Blasio described as "extraordinarily brave and ... part of their commitment."

The officers exchanged gunfire with Polanco, police said, but the suspects got away, fleeing on foot for one block and then carjacking the Camaro.

JUST WATCHED Two NYPD officers shot responding to a robbery Replay More Videos ... MUST WATCH Two NYPD officers shot responding to a robbery 02:20

At tense time for police in city

Sometime after the shooting, Kemp checked himself into a Manhattan hospital with a gunshot wound to the back, officials said. The man who drove him to the hospital was also taken into custody.

Kemp, who has been arrested multiple times for robbery and was on parole, gave an account of how he was shot that didn't add up, police said.

"He told a story that didn't seem factual, to be honest with you," Robert Boyce, chief of detectives, told reporters. "He was not credible. ... So, quickly the story didn't add up and then we saw his background, that he was a Bronx guy and we started breaking the case."

The incident happened just south of Fordham University, an area hardly unfamiliar to violent crime. John Cardillo, who patrolled the area when he was a police officer, called it "a rough neighborhood in the '90s, and it still is today... (It had and has) armed bad guys with the propensity to shoot someone."

The shootings have gotten heightened attention given when they happened -- at a time of large-scale anti-police protests after a grand jury decided not to indict a white New York police officer in the death of Eric Garner, an African-American man.

Even if it's too early to tie it to this incident, experts in the law enforcement community have expressed concerns that such sentiment -- views supported in some respects, according to some police, by de Blasio -- will encourage violence against police. That's what happened, they say, when Ismaaiyl Brinsley fatally ambushed NYPD officers Rafael Ramos and Wenjian Liu last month as they sat in their patrol car.

JUST WATCHED Police pay tribute to slain NYPD officer Replay More Videos ... MUST WATCH Police pay tribute to slain NYPD officer 01:54

"When the rhetoric turns anti-police, the police are concerned that people on the street, it's going to increase the already existent lack of respect in certain segments of the society -- including armed robbers ... and other violent criminals," said CNN law enforcement analyst Tom Fuentes, a former FBI assistant director.

De Blasio has become a focal point for supporters of law enforcement, with some police even turning their backs on him at Ramos' and Liu's funerals because of their perception that he has been overly supportive of protesters and critical of police.

"The relationship is toxic (and) almost irretrievable in some respects," CNN political commentator Errol Louis said of the mayor-police dynamic. "This is not a good atmosphere."

On Tuesday, Patrick Lynch, the president of the Patrolmen's Benevolent Association, who has accused de Blasio of having "blood on his hands" after the two officers were killed in December, said in a statement: "New York City police officers, who could have closed their lockers and gone home after their shift ended, chose to respond to a robbery in progress and, sadly, were shot in the process. Our members are out there doing their jobs and putting themselves in danger to keep this city safe just as they always do."