A man with a history of exposing himself in public was arrested after cops found him masturbating in front of women at a Paramus doctor’s office, authorities said Wednesday.

Brian Bates — or, as he might be referred to if he were on “Downton Abbey,” Master Bates — was charged with criminal open lewdness for the Friday incident at a Ridgewood Avenue office, according to borough police Chief Kenneth Ehrenberg. Officers went to the medical office for a report of a man exposing himself to patients.

“Upon police arrival, officers found Bates in the bathroom with the door open while masturbating and simultaneously attempting to penetrate his anus with the handle of the toilet bowl scrubber,” Ehrenberg said in a statement.

“This act was witnessed by several adult females who were in the office,” the chief added.

Bates was taken to New Bridge Medical Center for evaluation after being booked at police headquarters, authorities said.

The Spring Valley, New York, resident has a string of arrests for similar acts dating back to at least 1997 in the borough, police said.

He was seen exposing himself by 8, 9, and 11-year-old children at a Barnes & Noble in February 1998, according to police. In December 1997, two women spotted Bates masturbating at the bookstore. Police said he also exposed himself to a 4-year-old girl at the store in October 1997.

State court records show he pleaded guilty to a lewdness charge in 1998 and served a year of probation.

Noah Cohen may be reached at ncohen@njadvancemedia.com. Follow him on Twitter @noahyc. Find NJ.com on Facebook.