SAN DIEGO -- An ex-San Diego police officer pleaded guilty today to having sexual intercourse with a 17-year-old female student on four occasions while he was assigned to Southwest High School in southern San Diego.

Cedric J. Green, 45, faces anywhere from probation to five years in state prison when he is sentenced on Sept. 13.

In a hearing before Superior Court Judge George W. Clarke, the defendant -- who is out of custody on $290,000 bail -- pleaded guilty to four counts of having sex with a minor more than three years younger than himself.

Green admitted having sex with the 17-year-old Southwest High student on April 7, April 10, April 13 and May 8, said Deputy District Attorney Rachel Cano.

Fourteen other counts involving other sex acts were dismissed, the prosecutor said.

The victim is expected at the sentencing hearing, the prosecutor said. Green, a 21-year police veteran, was part of the Southern Division Juvenile Services Team. He was suspended from the force following his May 16 arrest, and has since resigned, Cano said outside court.

The married officer had been assigned to Southwest High, located in the southern San Diego community of Nestor, for the past 14 years.

Officials at Southwest High notified San Diego police on May 10, and the department's Sex Crimes Unit investigated the case for six days before arresting Green.

The defendant had previously worked at Mar Vista High in Imperial Beach.