Longtime Subway pitchman Jared Fogle agreed Wednesday to plead guilty to allegations that he paid for sex acts with minors and received child pornography in a case that destroyed his career at the sandwich-shop chain and could send him to prison for more than a decade.

Prosecutors allege that Fogle knew the pornography had been secretly produced by the former director of his charitable foundation, which sought to raise awareness about childhood obesity and arranged for Fogle to visit schools and urge children to adopt healthy eating and exercise habits.

Authorities said Fogle offered to pay adult prostitutes a finder's fee if they could connect him with minors for sex acts, including some as young as 14 or 15 years old.

"This is about using wealth, status and secrecy to illegally exploit children," U.S. Attorney Josh Minkler said.

A tight-lipped Fogle sat in federal court with his hands clasped and quietly answered "no" when the judge asked whether he had any questions about his rights. He is expected to enter the formal plea at a later date to one count each of travelling to engage in illicit sexual conduct with a minor and distribution and receipt of child pornography.

The agreement released by prosecutors said Fogle will pay $1.4 million in restitution to 14 minor victims, who will each receive $100,000. He will also be required to register as a sex offender and undergo treatment for sexual disorders.

The government agreed not to seek a sentence of more than 12½ years in prison, and Fogle agreed not to ask for less than five years, according to court documents.

Federal judges have wide discretion in sentencing, and Fogle could get a longer sentence. The child-porn charge carries a maximum penalty of 20 years in prison. The count involving sex with a minor is punishable by up to 30 years.

Fogle "knows that restitution can't undo the damage that he's done, but he will do all in his power to try to make it right," defense attorney Jeremy Margolis told reporters.

The married father of two, he added, has a "medical problem" and "expects to get well," but he did not elaborate.

As Fogle left the courthouse, several people jeered him amid a throng of TV cameras, onlookers and protesters.

Fogle, 37, became Subway's pitchman after shedding more than 200 pounds as a college student, in part by eating the chain's sandwiches. He was the public face of the company for more than 15 years — a period in which its number of locations tripled, making Subway the world's largest restaurant chain.

Subway suspended the partnership in July after agents raided his home in the affluent Indianapolis suburb of Zionsville, and the chain said this week that it had ended its relationship with Fogle.

Federal prosecutors allege in the documents that Fogle traveled to pay for sex acts, including with minors, from 2007 until as recently as June and that he repeatedly planned business trips to coincide with his sexual pursuits.

The court document detailing the charges against Fogle states that he paid for sex at New York City hotels with two girls under age 18 — one of whom was 17. But the plea agreement refers to the two girls as being 16, and that one of them also had sex with Fogle after she turned 17. Federal prosecutors could not explain the discrepancy between the two documents.

One of the girls told investigators she had sex with Fogle three times in November 2012 and again two months later, in January. After their first meeting, Fogle allegedly texted the girl and offered to pay her a fee if she could find him another underage girl to pay for sex acts.

During these discussions, Fogle "stated that he would accept a 16-year-old girl, while stating that the younger the girl, the better," the documents said.

Posts to social media place Fogle in New York around the dates of the alleged sex acts.

Tweets from Subway's official account indicate Fogle attended events ahead of the New York Marathon in November 2012, appearing in a segment of a news program on Nov. 1 and sitting on a panel with Subway teammates the following day.

On Jan. 12, 2013, Fogel tweeted from his personal account that he would appear on the "Subway Postgame Show" on CBS. He later tweeted photos of himself in Times Square and in the CBS studio.

Between 2011 and 2013, Fogle also repeatedly sent text messages to escorts, "soliciting them to provide him with access to minors as young as 14 to 15 years," the documents said, adding that he would only make such requests after engaging in sex acts with the escorts to "insure that they were not undercover police officers."

The documents also alleged that Fogle on multiple occasions received sexually explicit images and videos produced by Russell Taylor, 43, who ran the charitable Jared Foundation.

Two months before Fogle's home was raided, authorities arrested Taylor on charges that he produced and possessed child pornography. Investigators said they discovered a cache of sexually explicit photos and videos Taylor allegedly produced by secretly filming minor children at his home.

Prosecutors also allege that Fogle received from Taylor multiple images and videos, some of which were taken by a video camera hidden in a clock radio that filmed children changing clothes or bathing. Some were taken in buildings where Taylor lived.

The documents said Fogle knew those depicted were minors, some as young as 13 or 14 years old, and in some cases knew the minors involved by name and had met them "during social events in Indiana."

Assistant U.S. Attorney Steven DeBrota said investigators pored through some 159,000 text messages, 27,000 emails and 47,000 images and are "fairly confident" that evidence does not suggest any other victims beyond the 14.

Fogle was released on home detention after his initial court appearance Wednesday, and GPS monitoring will be used to track him while he awaits his next court appearance.

That will likely be several months away, according to a spokesman for the U.S. attorney's office. During that appearance, the judge will likely decide whether to accept a plea agreement and then determine the sentence.

The wife of former Subway pitchman Jared Fogle filed for divorce on Wednesday, saying she was shocked by the allegations that he engaged in sex acts with underage girls and traded in child pornography.

While Jared Fogle was in federal court in Indianapolis to hear the charges against him, his wife, Katie Fogle, released a statement through her attorney expressing disgust at her husband's actions.

"Obviously, I am extremely shocked and disappointed by the recent developments involving Jared," she said. "I am in the process of seeking a dissolution of the marriage. My focus is exclusively on the well-being of my children."

Katie Fogle said it would be her only public statement about the matter and she asked for privacy for her family.

In a separate statement issued through a public relations firm, Fogle's family said they were "shocked and profoundly disappointed" by his behavior but grateful that he is accepting responsibility. They also expressed concern for the well-being of those affected by his actions.

The statement was released on behalf of "the Fogle family" and didn't specify whether Katie Fogle also endorsed it.

Fogle's history with Subway reaches back to his days at Indiana University. The college paper published a story on his weight loss that was then picked up by national media.

Soon after, Subway's advertising agency reached out to Fogle and asked if he wanted to be in a TV commercial. The ensuing ad campaign resonated in part because Fogle seemed like such a regular guy, which made weight loss seem simple and achievable.

It's not clear how customers will react to Fogle pleading guilty to allegations that he paid for sex acts with minors and received child pornography, since it doesn't have anything to do with Subway's food or prices. But the association of the company's name with crimes that evoke such universal disgust come at a rough juncture for Subway.

"For a while, when you see a Subway ad, you're going to think about that child pornography charge," said Allen Adamson of the brand consulting firm Landor Associates.