DUBLIN — A Daly City man has been allowed to participate in a diversion program to settle charges that he tried to take a picture of a showering Fremont woman who lived next door to him at the time.

The diversion program gives 25-year-old Jalen Platero a chance to avoid a criminal conviction. He was charged with misdemeanor invasion of privacy after he allegedly held a camera up to the woman’s bathroom window. She told police when she noticed the lens and screamed, he ran away.

As part of the program, Platero must attend a substance abuse treatment program, stay away from the woman and the apartment complex where it occurred, complete 40 hours of community service, and generally obey the law, according to court records.

In the diversion petition, Platero’s lawyer said he was drunk at the time and wasn’t thinking clearly. It says he is “embarrassed” by the incident, which required him to not only apologize to the victim but his girlfriend at the time, and now is “seeking to get his life on the right track.”

“The photo was blurry and Mr. Platero deleted it from his cell phone. He immediately wrote an apology letter to the victim and remains heartily remorseful for his actions,” the petition says.