Mayor Bill de Blasio became a traffic cop over the weekend — directing his police detail to pull over a motorist who was texting while driving on the FDR Drive, he disclosed on Tuesday.

“I’m happy to be citizen patrol here,” quipped an animated de Blasio in recounting the incident, which occurred Saturday morning while on his way to Albany for a legislative event.

Speaking at a press conference announcing a new plan to reduce pedestrian fatalities, de Blasio recalled seeing a distracted woman driver “like right next to me out the window texting while driving.”

“The traffic was slow so I’m sure they thought they could get away with it. They were not paying attention to the road and I said, ‘Pull them over!’ ” he said.

“You know give her some on-the-spot education because I’m saying this as a parent, I don’t understand why people think they have a chance. They could kill someone.”

It is illegal for New York drivers to use their mobile devices on the road. Fines range from $50 for a first offense to $400 for more than three violations.

The mayor’s spokesman declined to identify the woman who was ticketed.