An NYPD detective has been arrested and charged with exposing himself in four separate incidents outside the homes of Rockville Centre teenage girls, police said Monday.

Det. Robert Francis, a 17-year-veteran of the NYPD based in Brooklyn, was arrested Sunday morning by Rockville Centre police and charged with four counts of public lewdness, three counts of endangering the welfare of a child, three counts of criminal trespass and one count of trespass, said Rockville Centre Police Commissioner Charles Gennario.

Francis, 46, a Queens resident, is accused in four incidents in which police said he followed the same pattern: entering the backyard of a home under the cover of darkness, pointing a flashlight at a window to gain the attention of one of the victims, and then pointing the flashlight to his private parts, Gennario said.

“He did say he had a lot going on in his life; he did show remorse,” Gennario said of Francis. “He kept telling the investigating detective he was going through tough times. ... He never gave us motivation.” The commissioner said he was worried Francis “might try to harm himself” after being arrested.

The NYPD said Sunday Francis was suspended without pay as a result of the arrest. Gennario said Francis’ superiors were notified and they stripped him of his badge and gun.

Francis could not immediately be reached for comment. It was unclear whether he had an attorney.

advertisement | advertise on newsday

The first incident was on Feb. 5 on Lakeview Avenue at 9:35 p.m.; the next on Feb. 25 at 9 p.m. on Seaman Avenue; the third on Feb. 27 at 8:50 a.m. on Brompton Road; and the most recent on Friday at 11 p.m. on Sherman Avenue, police said.

In three of the incidents, the girls were under 16, and one was 17.

After the first two incidents, police questioned a registered sex offender, who then moved out of the village, and because the incidents stopped, cops thought they had their guy, Gennario said. They also increased patrols.

But after the Friday incident, police knew the suspect was still at large, and on Saturday a man was spotted in the driveway of a Sherman Avenue home, and Gennario said police believe he was casing for a house to do it again.

“We thought we were free and clear so it was a shock to us when this incident occurred on Friday night,” Gennario said.

A police officer investigated the report of a suspicious person in the Sherman Avenue driveway and began questioning Francis, who identified himself as a police officer. Under questioning at the Rockville Centre police station, Francis confessed, Gennario said.

It was unclear why he came to Rockville Centre, Gennario said, adding that Francis told investigators he had committed similar acts in other areas, but the commissioner said he didn’t know the locations.

Francis was given desk appearance tickets after his 2:30 a.m. arrest on Sunday. Asked about that decision — the department had the option of booking him and bringing him to court for arraignment — Gennario said Francis got no special treatment because he’s an officer.

advertisement | advertise on newsday

Gennario said the department frequently uses desk appearance tickets to save money on processing.

Francis is due in court on April 17.