Two men arrested Tuesday in connection with the Bronx shooting of two off-duty plainclothes officers during a robbery investigation were charged Tuesday night, authorities said.

Officers Andrew Dossi, 30, an Iraq War veteran, and Aliro Pellerano, 38, both of the 46th Precinct, were in stable condition Tuesday at St. Barnabas Hospital after they were shot by one of the suspects, police said. Dossi was shot in the left arm and back. Pellerano was hit in his left arm and side, police said.

Jason Polanco, 24, of 2639 Decatur Ave. in the Bronx, was charged with attempted murder of a police officer, attempted murder, robbery, criminal possession of a weapon and assault, police said. Joshua Kemp, 28, of 5 Metropolitan Oval in the Bronx, was charged with robbery, grand larceny, criminal possession of a weapon and criminal possession of stolen property, police said.

The charges, coming about 24 hours after the shooting, capped another day and night of tension for the NYPD. Less than a month after the fatal shootings of two officers in Brooklyn, officers again packed a hospital trauma ward to support wounded colleagues. Nearby -- just like after the Dec. 20 shootings -- Mayor Bill de Blasio and Police Commissioner William Bratton gave updates to the news media about the officers and the latest shooting.

Dossi and Pellerano had ended their shifts Monday night when they got word of the bodega robbery at about 10:30 p.m., Bratton and other police officials said. Instead of heading home, they jumped into a police vehicle with three other officers in pursuit of suspects, officials said.

Because their workday had finished, it was possible the wounded officers were not wearing their bulletproof vests when they came upon Polanco and Kemp outside a Chinese restaurant on East 184th Street near the intersection of Tiebout Avenue, said Chief of Department James O'Neil.

"They were going off duty so chances are they weren't wearing their vest," O'Neil said Tuesday. "But we didn't get to interview everyone yet, but that is what we are thinking."

According to Chief of Detectives Robert Boyce, police got the call of a robbery inside a bodega at 2641 Decatur Ave., and anti-crime officers responded. That robbery was captured on surveillance video.

The five officers saw Polanco and Kemp, who fit the description of the bodega robbers, at the Chinese restaurant, Boyce said. Polanco is seen on video inside the restaurant ordering a drink before wheeling around and firing through the front door at Dossi and Pellerano, Boyce said. The same round hit Kemp and one of the officers, Boyce said. Polanco continued firing at the officers before fleeing, Boyce said. Officer Michael Pomerantz fired at Polanco as he and other officers gave chase, Boyce said.

Polanco then carjacked a vehicle and drove it a short distance before jumping out and fleeing, ditching his .44-caliber Magnum, which was recovered, Boyce said. Polanco was taken into custody Tuesday in the Bronx, police said.

A wounded Kemp made his way to NewYork-Presbyterian Hospital/Columbia University Medical Center and gave an implausible story about being shot on Dyckman Street, Boyce said. He was taken into custody at the hospital, Boyce said.

O'Neil credited Dossi and Pellerano for jumping into action.

"I applaud them for their dedication, commend them for their courage," O'Neil said. "They were going home, jumped into a car and get into this firefight."

Bratton cited the officers' bravery by putting themselves in harm's way when they could have gone home.

In a statement, de Blasio, the object of criticism from some police unions and rank-and-file officers after the killings of Officers Wenjian Liu and Rafael Ramos, said the city's prayers went out to the officers.

Andrew Dossi's father, Joseph Dossi, said when he saw de Blasio at the hospital early Tuesday morning, "the mayor seemed very concerned, very humbled and I thought maybe he is putting his hand out."

With Alison Fox and Maria Alvarez