Former Subway spokesman Jared Fogle has admitted to sexual contact with at least 2 minors and possessing child pornography.

Fogle asked a federal judge on Wednesday to accept his plea of guilty to charges of child pornography and traveling for illicit paid sex with minors.

Under the deal, Fogle would serve between five and 12 years in prison, pay $1.4 million in restitution to 14 minor victims, register as a sex offender and meet other conditions.

Related: Jared Fogle allegedly paid 16-year-old for sex

Immediately after the hearing Fogle's wife, Katie, said in a statement that she was filing for divorce.

"Obviously, I am extremely shocked and disappointed by the recent developments involving Jared. I am in the process of seeking a dissolution of the marriage," she said in the statement released by her lawyer.

After the hearing, Fogle's lawyer told reporters, "He expects to go to prison, he will do his time... He will continue to make amends to people whose lives he has affected, and at some point hopes to become again a productive member of society."

A judge is reviewing Fogle's request for a plea.

According to the indictment, the head of the Jared Foundation, Russell Taylor, secretly taped 12 minors while they were changing clothes, showering and bathing at his home, including two who were as young as 13 or 14 years old. He shared the images with Fogle, who knew they showed minors, prosecutors said.

Prosecutors said Fogle also received commercial child pornography from Taylor, viewed it and failed to report it. He stored explicit images of children as young as six, prosecutors said.

Fogle traveled to New York City at least twice between 2010 and 2013 seeking sex with minors, and paid for sex acts twice with a girl he knew to be 17 years old. He told the girl he would “make it worth her while” if she could find him another minor to have sex with, “the younger the girl, the better,” according to the indictment.

Prosecutors said he repeatedly asked prostitutes and others to find him 14- and 15-year-olds for sex.

Police and prosecutors said in a news conference on Wednesday that the investigation of Taylor and Fogle started after a tip from a private citizen.

Fogle became a Subway spokesman after losing a reported 245 pounds in part by eating regularly at the sandwich chain. He made his first Subway commercial in 2000, and appeared in a new one last year, according to Subway.

Reuters contributed to this report.

Note: An earlier version of this article reported that Jared Fogle admited to having sex with 14 minors. This was incorrect. Fogle admited to paying two minors for sex, and possessing child porn that victimized 12 other minors. The total number of victims is 14, but Fogle only admitted to having sex with two of them.