The "butterfly effect" — no, not that movie with Ashton Kutcher — is a chaos theory term coined by Edward Lorenz to describe how seemingly small incidents can trigger major changes later in time. If a butterfly flaps its wings, the theory goes, it can set in motion a chain of events that lead to a distant tornado weeks later.

It might also help explain the peculiar quarterback matchup coming Sunday, when two former teammates will become the first pair of quarterbacks since the AFL-NFL merger to meet in a conference championship game after neither started in Week 1.

Case Keenum and Nick Foles — both signed as insurance plans for their teams before the 2017 season — will instead compete for an NFC title in Philadelphia in one of the more unlikely QB duels in recent championship game history. In an era when teams are ordinarily powered to deep playoff runs by gilded quarterbacks, the Vikings and Eagles are here because of stout defenses, strong running games and impromptu starters who kept their teams going.

"I know this is what all of you guys predicted back in the day: a Foles vs. Keenum NFC Championship [Game]," Keenum said. "So good job to all of you guys who predicted that."

Did anybody — including the people involved — predict it? And could anybody have foreseen the wild twists that led Foles and Keenum to this point?

Let's try and figure out how we got here: It all goes back to Nov. 8, 2015.

On that day, the Rams came to Minneapolis for what would turn out to be their last game with a winning record while playing in St. Louis. Foles completed only 18 of his 33 passes for 168 yards in a 21-18 loss to the Vikings, a violent, visceral game that saw Rams cornerback Lamarcus Joyner knock out quarterback Teddy Bridgewater with an elbow to the head on a diving tackle. Former Rams QB Shaun Hill finished the game, Blair Walsh kicked a game-winning field goal in overtime after Mike Zimmer chose to take the wind after winning the coin toss, and St. Louis began a five-game losing streak that saw Foles lose his job to Keenum.

That same day in Dallas, Eagles QB Sam Bradford returned from the bye week feeling as good as he had since his torn ACL caused the Rams to trade him for Foles, reuniting him with offensive coordinator Pat Shurmur in Philadelphia. Bradford went 25-for-36 for 295 yards, hitting Jordan Matthews for a 41-yard touchdown in a 33-27 overtime victory over the Cowboys (whose quarterback, in another twist, was former Viking Matt Cassel).

It started a nine-game stretch in which Bradford completed 68 percent of his throws, posted a passer rating of 97.0 and sent a message to anyone who might be watching that he was still worth the risk after two knee surgeries.

After being released in July 2016, Foles signed with the Chiefs following a brief stretch of interest from the Vikings (where Shurmur, Foles' former coordinator in St. Louis, was now working). Bridgewater tore his ACL on Aug. 30, and after talking to the Chiefs about Foles, the Vikings sent their first-round pick to Philadelphia for Bradford.

Foles returned to Philadelphia after 2016, where Eagles coach (and former Chiefs offensive coordinator) Doug Pederson brought him in to back up Carson Wentz. The Vikings signed Keenum, who'd given way to Jared Goff in Los Angeles, to back up Bradford. After Week 1, Bradford's left knee acted up again. In Week 14, facing Goff and the Rams, Wentz tore his ACL.

Keenum and Foles helped their teams keep winning, the Eagles and Vikings secured the top two seeds in the NFC and set up the meeting between the two QBs on Sunday.

Simple, right?

"Nick is a great guy. One of my best friends," Keenum said. "A really, really solid guy. Great faith, great family. My wife and his wife are great friends. His entire family are good people. Great football player. Prepares well, extremely talented, big arm and he's really, really athletic, too. I know he's got a lot of confidence and I'm looking forward to playing against him."

While Shurmur has reoriented the Vikings' offense around Keenum since Week 2, the timing of Wentz's injury gave the Eagles less time for the same task with Foles.

"We simplified some of the motions and shifts," Pederson said. "We just wanted to get back to the things Nick was comfortable with. He's only been in there a month, so it's a little bit harder to get him ready. You're only a couple weeks into the Nick Foles era. It just takes time. We eliminated some of the extra things and said, 'Hey, let's just go play.' "

Foles went 23 of 30 for 246 yards in the Eagles' 15-10 victory over the Falcons last week, fumbling twice but finishing without a turnover. Now he'll have the hopes of Philadelphia on his shoulders, as an Eagles team that hasn't won a conference title since 2004 faces a Vikings team that's lost five NFC Championship Games since its last Super Bowl trip after the 1976 season.

"It's pretty wild," Foles said. "We were on the same team not too many years ago. But Case's success and the way he plays doesn't surprise me. I think the big message there is no matter what happens, you just have to keep believing in yourself, keep working hard and never give up."

And if a butterfly flaps its wings …

"I think we've seen it a lot," Shurmur said, "where you get a quarterback in a system and a place, the stars all cross, and a guy has a chance to have success."