This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

INDIANAPOLIS — Ahead of his initial appearance in federal court Wednesday, former Subway pitchman Jared Fogle reached a plea agreement with prosecutors that would see him serve between five and 12 1/2 years in prison for handling child pornography and having sex with a minor.

The court will have to approve the agreement, in which Fogle pleads guilty to possessing and distributing child porn, and traveling across state lines to have sex with at least two teenage girls.

Under the plea deal, the government agrees to recommend less than 13 years in prison for Fogle. Also, Fogle’s lawyers agree to ask the judge for no less than a five-year prison term.

RELATED: Jared Fogle court documents

The agreement says Fogle will adhere to a pornography ban and sexual disorders treatment, and he will have no unsupervised visits with minors, among other requirements.

Computer monitoring will be required, too.

Fogle became a household name as “Jared from Subway” after a dramatic weight loss that he attributed to eating at Subway restaurants.

He became famous in 2000 when the sandwich chain released a commercial centered on his claims that he dropped about 245 pounds — from a peak weight of 425 — in one year as an Indiana University student, thanks in part to exercise and a simpler diet involving Subway subs.

The sandwich chain suspended its relationship with Fogle earlier this year after investigators raided his Indiana home.

The raid came more than two months after Russell C. Taylor, the executive director of the Jared Foundation, was arrested in Indianapolis on federal child pornography charges.

Authorities previously said Taylor, 43, of Indianapolis, was charged in May with seven counts of production of child pornography and one count of possession of child pornography.

During an April search at Taylor’s home, authorities found “a cache of sexually explicit photos and videos Taylor allegedly produced by secretly filming minor children” there, federal prosecutors said in statement.