A New York City detective heard on video berating an Uber driver and asking how long he'd been in the country has been stripped of his gun and badge.

Detective Patrick Cherry also will be transferred from an anti-terrorism division.

It's not clear exactly why Cherry pulled over the driver for the ride-hailing service Uber on Monday. Cherry is heard on a passenger's video saying the driver committed various traffic violations while Cherry tried to park his car.

The detective swears and shouts at the driver as the driver gives compliant responses. Cherry says he doesn't care what the driver has to say and asks how long he's been in the U.S.

Police Commissioner William Bratton said Wednesday the detective's comments were inappropriate.

Cherry's union president says Cherry shouldn't be "judged by one isolated incident."