An off-duty police officer who had just finished playing basketball with his family was shot when a couple of men tried to rob him in East New York Tuesday evening, authorities said.

The officer, 33-year-old Tramaine Oxley, was sitting in his Range Rover on Bradford Street after the game at about 10:30 p.m. when a pair of armed men jumped out of a dark BMW, said a law enforcement official with knowledge of the investigation.

They tried to open the doors of the Range Rover and that's when the chaos broke out.

Both Oxley and his attackers fired their guns. It was not immediately clear who fired first.

Oxley was hit in the left forearm and grazed in the torso, the official said. He was taken to Brookdale Medical Center in stable condition, police said.

The men took cash and jewelry and fled the scene, the official said.

There had been no arrests as of Wednesday afternoon.