A traffic agent can be seen writing a parking ticket for two plainclothes cops while the officers were sitting in their unmarked car in the Bronx, sources said.

The traffic agent approached the vehicle at East Fordham Rd and Morris Avenue as the officers were inside and had their badges visible on their chest — but proceeded to write the ticket anyway, according to police sources.

The exact date of the incident was not clear.

The incident was captured on a cellphone video taken by one of the officers in the car — who could barely contain his laughter about the agent’s parking crackdown.

An NYPD spokesperson said the cops’ commanding officer “has been made aware of the video and is conducting an investigation.”