Two veteran NYPD officers were arraigned Wednesday on charges accusing them of beating a postal worker who they say had given street directions to a man who later killed two policemen in 2014.

Detectives Angelo Pampena, 31, and Robert Carbone, 29, dragged postal worker Karim Baker out of his parked car and repeatedly punched and kicked him, according to a five-count indictment detailing the charges. The incident occurred six months ago in the Corona neighborhood.

Baker, 26, had just finished his shift and gotten into his car when the two detectives approached. He suffered serious injuries from the assault, the indictment states.

After the encounter, Pampena filed a sworn statement saying Baker was parked in front of a fire hydrant. However, video from a surveillance camera showed that Baker's car was more than 15 feet from the hydrant.

The criminal case against Baker was dismissed. Pampena was subsequently charged with perjury.

Baker appeared on surveillance video giving directions to Ismaaiyl Brinsley, who shot and killed officers Wenjian Liu and Rafael Ramos were killed on Dec. 20, 2014. Brinsley shot the officers at point-blank range through their cruiser window. He then killed himself with the same weapon.

Baker gave Brinsley directions to two housing projects. It's not clear how much time elapsed between the directions and the slayings.

"The entire conversation lasted about 10 seconds. Mr. Baker gave him directions and they parted their separate ways," his lawyer, Eric Subin, said in November.

After that, Baker was questioned and then "systematically harassed" by police - including officers lurking around him and his family and about 20 traffic stops in nine months, Subin said.

The indictment charges Pampena and Carbone withe second- and third-degree assault. If convicted, they face up to seven years in prison.

Pampena has been an officer for nine years; Carbone is an eight-year veteran of the force. They had been assigned to the Queens North Gang Unit.

Their attorneys did not immediately respond to messages from The Associated Press requesting comment.

Last month, a postal worked accused officers in Brooklyn of roughly handcuffing him after he shouted at them for nearly hitting his mail truck with their unmarked car. The NYPD is investigating his complaint.