Philadelphia Eagles coach Doug Pederson won a Super Bowl ring following the 1996 season while backing up Brett Favre with the Green Bay Packers. Frank Reich, the Eagles' offensive coordinator, was Jim Kelly's understudy for each of the Buffalo Bills' four Super Bowl trips, helping engineer the third one with the greatest comeback in NFL playoff history.

The two men, in other words, know what they're looking for in a capable backup quarterback. And as the Eagles sorted out a thorny situation behind Carson Wentz last spring, they knew they wanted to end up with Nick Foles.

The Eagles signed Foles to a two-year contract March 13, knowing that meant they could part with Chase Daniel a year after giving him a three-year, $21 million deal. When Daniel requested — and was granted — his release the same day, it meant the Eagles would have to absorb a $7 million cap hit.

"We knew what kind of person [Foles] was. We drafted him," Eagles General Manager Howie Roseman said. "We made him our starter and then when we had an opportunity to bring him back, I think for Coach [Pederson] and for our front office, the question was really to go to [owner] Jeffery [Lurie], because of the amount of money he had to eat on our quarterback position. But to his credit, he was totally on board. It's all about winning to Jeffery.''

The Eagles had traded Foles to St. Louis for Sam Bradford in 2015. But had they not made the move to bring Foles back two years later, the Eagles might not be in Minneapolis for Super Bowl LII this week.

Foles' bravura performance in the NFC Championship Game found the quarterback in full control of the Eagles' offense against the Vikings, after a five-game stretch that had turned the NFC's top seed into a fashionable pick for an early playoff exit. The doubt that made the Eagles underdogs in two home playoff games was trained on Foles, but he erased it just in time for a 352-yard performance that has Philadelphia in the Super Bowl for the first time since the 2004 season.

When a torn ACL ended Wentz's MVP-caliber season on Dec. 10 in Los Angeles, the Eagles' fortunes were hoisted onto Foles' shoulders. Even though the Eagles hung on for a 43-35 win over the Rams that day, it appeared those shoulders might not be able to carry Philadelphia's Super Bowl hopes.

"The city had embraced Carson like few others," Reich said. "And then bam — it's gone. It's like for a week or two, the city just lost its breath."

The Eagles needed all four of his touchdown passes to complete a frantic comeback against the 2-12 Giants the next week, and Foles completed only 19 of his 38 passes for 163 yards in a windy Christmas night victory over the Raiders, before playing only one quarter of the 6-0 loss to the Dallas Cowboys that ended the regular season.

The Eagles had a modest offensive showing in their NFC divisional playoff victory over the Atlanta Falcons, kicking five field goals in a 15-10 win.

And then came the NFC Championship Game.

In Foles' stunning performance against the NFL's top-ranked defense, he completed four of his five passes of 20 yards or more, for 172 yards and a pair of touchdowns. His passer rating on those throws was a perfect 158.3, as the Eagles laid waste to the Vikings secondary.

"I think the biggest thing it takes is knowing you're on a great team, and knowing you don't have to go out there and be a superstar," Reich said. "I think that's what Nick has done. He's been content to run the offense, but he still has an aggressive mind-set."

During his time shifting from the Eagles to the Rams and then to the Chiefs, Foles admitted he'd considered retirement. Now, he's got a chance to complete one of the great cameo roles in NFL history.

"To come back to the Philadelphia Eagles, the team that drafted me, the team that I love, the city I love, that I never wanted to leave, it's really special," Foles said.