Members of the Thin Blue Line were forced to arrest one of their own after he was busted masturbating while peering into a child’s window.

New York City Police Detective Robert Francis, 46, was in Rockville Centre police custody charged with public lewdness and endangering the welfare of a child after he was arrested him at 2:30 a.m. on Sunday, according to Pix11.

He has since been released on a desk appearance ticket, which means he did not have to post a bond and was freed from jail with a mere promise to appear in court at a later date to face the charges against him.

Francis’ arrest comes shortly after a rash of reports from several Rockville Center residents reporting a naked man trolling through back yards, knocking on windows then using a flashlight or forehead light to expose himself to children.

Callers reported the man was naked from the waist down. Police have not said whether he is linked to those previous incidents or specified how they determined the detective was the suspect reported.

According to reports, shortly after highlighting his lewd acts, the man described as being 5-foot-10 and weighing about 220 pounds, took off running.

Three incidents were reported in February between 8 and 9 p.m.

Detective Francis was located shortly after the call and arrested just a few blocks away from the scene.

Earlier this month, Charles Gennario, the Rockville Centre Police Commissioner, stated he believes reports of the man are connected.

“This is raising our level  of concern now,” Genneario said on Sunday.

A call from a Rockville Centre homeowner Sunday prompted Francis’ arrest.

The caller told authorities a he could see a man masturbating in his backyard.

NYPD confirmed Francis, who is employed by the 71st precinct in Brooklyn, has been suspended without pay.

Police are now trying to determine if Francis is the suspect callers described in previous reports and are looking into whether they can add more charges to the list of charges he now faces.

Police have not yet made that specific correlation, but are expected to release more details later today.

Rockville Centre is a village in Nassau County about an hour’s drive from New York City.

Anyone witnesses, or those with information regarding public lewdness in the area, are urged to call the Rockville Centre Police Department at 516-766-1500.