Police in Brooklyn are investigating after an off-duty police officer was shot during an attempted robbery Tuesday night.

It happened around 10:30 p.m. on Bradford Street in East New York.

Investigators say an officer was sitting in a Range Rover with relatives when a dark BMW pulled up behind them.

Police say two men got out of the BMW and robbed the officer and his family at gunpoint.

"At that point the Range Rover left the scene to get away from the people that just robbed them. They made a U-turn and on the way back the people that robbed them were in the middle of the street. At one point shots were fired at the Range Rover and an additional point, our off-duty MOS fired four rounds at the people around him," said NYPD Chief of Department James O'Neill.

The officer is being treated at Brookdale hospital for a gunshot wound to his left arm and a graze wound to the chest.

He is expected to make a full recovery.

Police are now searching for the men in the BMW and say they got a partial license plate.

Anyone with information on the case should contact the Crime Stoppers hotline at 1-800-577-TIPS, or text CRIMES and then enter TIP577, or visit www.nypdcrimestoppers.com.