Investigators said they were able to track down the suspect thanks to the quick-thinking teen, who pulled out her cell phone and snapped a picture of his license plate as he sped off.

“The biggest single factor that helps us solve crimes is the cooperation from the public and when a 13-year old girl has the presence of mind to take a picture of a defendant or a license plate or anything that can help us solve a crime, that is exactly what we want the public to do,” said Inspector Kenneth Lack with Nassau County police.

Jason Good, 35, was arrested and charged with public lewdness and endangering the welfare of a child, police said.