NEW YORK — A police officer has been arrested on charges of assault and intimidating a witness after authorities say he beat a man over a dropped plastic cup in Brooklyn this summer.

Prosecutors say Officer O’Keefe Thompson was patrolling Coney Island in July when he ordered 23-year-old Raymond Crespo to pick up a cup after his friend knocked it out of his hand.

Crespo refused and prosecutors say Thompson roughed him up. Crespo went to the hospital for treatment and filed a complaint against the officer the next day.

Prosecutors say Thompson heard about the complaint and confronted Crespo while off-duty. They say Thompson lifted his shirt, displaying his handgun, and threatened him.

Both incidents were captured on video.

Thompson was arraigned Monday. A message left with his lawyer wasn’t immediately returned.