PORTLAND — A convicted sex offender was sentenced to four years in prison today for being in an area where prosecutors say he targeted homeless women as his victims.

Frank Lapomarda, 69, is barred from the area bordered by Forest Avenue, Franklin Street, Marginal Way and Congress Street, where Preble Street and other social service agencies are located. He was convicted in March of violating probation by being at the Forest Avenue post office.

Lapomarda pleaded guilty a year ago to three counts of gross sexual assault and unlawful sexual contact. He was ordered to serve  2½ years of a 20-year prison sentence and six years of probation, and was given credit for the time he had served in jail since his arrest in 2007.

Deputy District Attorney Meg Elam asked Cumberland County Superior Court Justice Roland Cole to sentence Lapomarda to the remaining 17½ years on his sentence. Clifford Strike, Lapomarda’s lawyer, noted that the probation violation was his client’s first.