However, if Medvigy decides that prison is warranted in the case, Luz would be allowed to back out of the plea deal and seek a jury trial.

The ruling followed a complaint from the family of the 13-year-old victim that they were not informed by prosecutors that Luz could get probation under the settlement agreement.

The family said the plea violated the California Victims Bill of Rights Act, known as Marsy's Law, which requires, among other things, that victims be notified at critical stages of criminal proceedings.

"Certainly, Marsy's Law was not followed in its intent," Medvigy said from the bench. "I think the people concede that."

He said the family and prosecutors could make their case for prison at Luz's sentencing. Family members listened to Monday's hearing from the courtroom audience.

However, Medvigy said the original deal in which prosecutors agreed to drop probation preclusion enhancements along with eight counts of child molestation in exchange for probation was "not outside the interest of justice."

Luz was arrested in August 2012 in the Cook Middle School parking lot after agreeing to meet the victim to help her run away from home.

The girl said she had been in daily telephone contact with Luz on an adults-only chat line and had informed him of her age. The two engaged in extensive phone sex including role playing and masturbation, but there was no physical contact.

Luz was charged with 10 counts of child molestation by phone, carrying up to 26 years in prison if convicted.

But after serving 10 months in jail, he reached an agreement with prosecutors and the judge. He was freed in June pending sentencing.

The victim's family complained they were not informed of the agreement despite meeting with prosecutors before it was ratified. Prosecutors later sided with the victim's family in seeking to vacate the deal.

"We still believe the plea was invalid," the family's lawyer, Amy Terrible, said in court Monday.

You can reach Staff Writer Paul Payne at 568-5312 or paul.payne@pressdemocrat.com.