Jared Fogle, former spokesman for Subway, was charged in a federal court with paying for sex with minors and possessing child pornography. Here's a look inside the charges and what investigators say he did. (The Washington Post)

Jared Fogle, the fat-shedding “Subway guy” and former face of the world’s largest restaurant chain, agreed Wednesday to a plea deal for possessing child pornography and having sex with underage girls, a precipitous fall for an American everyman held up as a model for healthy living.

Between 2007 and this summer, prosecutors said, Fogle paid for and planned his business travel around repeated sexual encounters with underage girls. With his partner in the Jared Foundation, a childhood-obesity charity, Fogle also traded lurid pictures and videos of nude children as young as 6.

Fogle, 37, agreed to a deal Wednesday morning at an Indianapolis courthouse ringed by attorneys and federal marshals. As part of the deal, Fogle agreed to serve at least five years in prison and pay $100,000 to each of 14 victims to fund counseling, treatment and other assistance.

The charges marked a stunning end for the surprise-star role model and suburban family man, whose affable tale of achievable weight loss touched a nerve in a nation growing increasingly overweight.

In his prime, Fogle spoke about his diet struggles on TV with Oprah Winfrey, at Harvard health conferences, and to thousands of schoolchildren during national tours dedicated to eating right.

In this Tuesday, July 7, 2015, file photo, an image of Subway restaurant spokesman Jared Fogle is seen on a menu board hanging inside one of its locations in St. Louis. (Jeff Roberson/AP)

His quintessentially American success story also propelled the no-frills hoagie chain to become one of the country’s most popular eateries, further fueling a rapid expansion that helped its U.S. franchises outnumber those of McDonald’s and Starbucks, combined.

Fogle’s downfall as a prominent pitchman, one of the steepest in corporate history, underscores the danger for companies that crown sports figures, celebrities and inspiring unknowns as the embodiment of their brand.

Fogle will join the ranks of disgraced business endorsers such as O.J. Simpson, Michael Vick and Lance Armstrong, whose criminal charges or public embarrassments upended their corporate partners virtually overnight.

But Fogle’s case could prove particularly damning, because of the seriousness of the charges and the simplicity of Fogle’s origin story. While the others were celebrities first, Fogle became famous solely because of Subway’s wholesome ideal.

Steve Rivkin, a marketing consultant with Rivkin & Associates, said, “I’m sure this is causing other major brands to look at this situation and say . . . ‘What’s our vulnerability, and what’s our fallback if something awful happens?’ ”

Fogle, a married father of two, will be required to register as a sex offender and pursue treatment for sexual disorders. Prosecutors agreed not to seek more than a 12 1/2- year prison sentence, although a federal judge could levy a longer term.

Fogle, who made millions off Subway endorsements and motivational speeches, used “wealth, status and secrecy to illegally exploit children,” U.S. Attorney Josh Minkler said at a news conference Wednesday. Jeremy Margolis, Fogle’s attorney, said after a court hearing that “Fogle expects to go to prison” and “will do his time.”

In July, federal agents raided Fogle’s home in Zionsville, a suburb of Indianapolis, after a tip sparked an investigation that spread to local, state and federal authorities, including the FBI.

Fogle’s wife, Katie Fogle, said in a statement that she was “extremely shocked and disappointed” by the charges and will seek a divorce. His relatives said they were “very concerned for the well being” of his victims, adding that they hoped he would benefit from treatment and “look forward to the day that he rejoins our family and society.”

After the raid, Subway publicly and abruptly suspended its partnership with Fogle and began scrubbing his history from its online ads, including removing an online game, “Jared’s Pants Dance,” from the chain’s Subway Kids site.

Steven DeBrota, a prosecutor, said authorities had filed no charges alleging that anyone at Subway knew of Fogle’s crimes. In a statement Wednesday, Subway said it had previously ended its partnership with Fogle and added that his “actions are inexcusable and do not represent our brand’s values.”

Russell Taylor, 43, the Jared Foundation’s former executive director, was charged in May with seven counts of production and one count of possession of child pornography. In a raid on Taylor’s home in Indianapolis, authorities found more than 400 pornographic videos of children.

Prosecutors said that Fogle began asking about sex with minors years before Taylor began producing child pornography in his home and that Fogle received and viewed videos of Taylor victimizing a 14-year-old girl.

A dozen minors were secretly filmed and photographed changing clothes or bathing in Taylor’s home, and those explicit recordings were then shared with Fogle and others, court documents state. Fogle knew the victims’ ages, names and addresses, and met some at Indiana social events.

Fogle also traveled to New York to engage in sexual acts with two teenage girls, meeting with them in plush Manhattan hotels after they were trafficked online. In 2012, court documents said, Fogle offered one girl more money if she would find him another underage victim, adding, “The younger the girl, the better.”

About that time, tweets from Subway’s official account showed Fogle was attending New York Marathon events and promoting Subway on TV newscasts.

Fogle first starred in Subway ads in 2000 as an Indiana University student who had lost 245 pounds on the “Subway diet,” changing his life after an obesity scare by eating no-cheese veggie or turkey subs for almost every meal.

“I was reborn in every sense of the word,” Fogle told the campus newspaper, the Indiana Daily Student, in 1999. “Subway helped save my life and start over. I can’t ever repay that.”

Fogle became a surprise hit for Subway, a Connecticut-based deli chain with growing ambitions to win over millions of eaters increasingly skeptical of fast food. A stark counterpoint to Ronald McDonald, he began traveling to share his plain-spoken testimony, always while hoisting an old pair of his wide-waisted blue jeans.

The Jared campaign also proved to be a resounding sales success. Between 2000 and 2006, Subway’s U.S. sales doubled, from $3.8 billion to $7.7 billion, allowing the chain to further stake its claim across the country’s strip malls and family meals.

One year after Fogle’s first ad, Subway’s store count in the United States for the first time passed that of McDonald’s. Subway sandwiches now roll out of more than 44,000 restaurants in 110 countries.

The ad blitzes and heartwarming story also catapulted Fogle to sudden stardom. He gave the keynote address at a Harvard University obesity conference, carried the Olympic torch and spoke about his weight struggles on “The Oprah Winfrey Show,” “American Idol” and “Larry King Live.”

In 2007, the first year covered by the federal sex-crime charges, Fogle published a self-help book, “Jared, The Subway Guy: Winning Through Losing: 13 Lessons for Turning Your Life Around.”

Youth and health advocates were overjoyed to share a real-life example of eating right. Starting in 2008, Fogle began speaking to tens of thousands of middle school students as part of the Jared & Friends School Tour, an American Heart Association-sponsored program built to teach kids about healthful eating.

After he launched the Jared Foundation, Fogle said he was motivated to help children have a healthier upbringing than his own, adding, “Now I am in a position where I can have some influence with kids, and hopefully, can help them learn to make better choices.

Sarah Larimer and Roberto Ferdman contributed to this report.