Police have arrested the man who they say attacked an off-duty police officer in the Bronx.

Sources say 21-year-old Samuel Thornton was taken into custody in Philadelphia.

Police identified him as the man who assaulted and robbed a 41-year-old female officer around 5 a.m. Wednesday near her Williamsbridge home.

The off-duty officer was getting into her car to go to work when police say Thornton snatched a gold chain from her neck.

Authorities say she reached into her bag, but he grabbed it and punched her in the face before running off.

Police say the officer's gun was in her bag.

Sources say Thornton told police he buried the firearm in a backyard, and police have recovered the weapon.

Sources say he also told them he didn't know the victim was a police officer.

Thornton has one prior arrest for possession of marijuana.