Carolyn Kaster/Associated Press

After much speculation, the Los Angeles Rams and quarterback Jared Goff have come to terms on a long-term contract extension.

ESPN's Adam Schefter reported Goff and the Rams agreed on a four-year, $134 million extension with $110 million guaranteed that will keep him under contract with L.A. through the 2024 season.

Despite being one of the NFL's most productive quarterbacks since 2017 and leading the Rams to an appearance in Super Bowl LIII, Goff's future with the organization became a topic of great debate.

A lot of the discussion seemed to be coming from outside the Rams locker room. Head coach Sean McVay told NFL Network's Michael Silver in June there was no doubt his quarterback would get a new deal:

"Whether it ends up happening this year or next year, there is a zero percent chance this guy's not gonna get an extension he's worthy of. All the narratives out there are wrong. Jared and I couldn't be more connected, and I couldn't be more appreciative of him as our leader. He is so vital and important to us and our success. That extension will get done. It's a matter of when, not if."

There wasn't a sense of urgency from the team since Goff was already under contract through 2020. The fifth-year option on his rookie deal was picked up in April 2019, guaranteeing him $27 million over the next two seasons.

Goff's career is directly tied to McVay, especially because of the immediate and drastic improvement he made following a historically bad rookie campaign in 2016. Here's a comparison of his first year under Jeff Fisher with a Week 4 game in 2018 against the Minnesota Vikings:

The Rams have been among the most aggressive teams in the NFL when it comes to handing out contracts. They gave out lucrative long-term extensions to Aaron Donald (six years, $135 million), Brandin Cooks (five years, $81 million), Todd Gurley (four years, $57.5 million) and Rob Havenstein (four years, $32.5 million) prior to the 2018 season.

That strategy ultimately paid off with an NFC championship, but it did tie up a lot of cap space into those four players at a time when Goff's deal was coming due.

Credit Rams general manager Les Snead for making it all work and keeping a competitive team that can be one of the best in the NFC for the foreseeable future.

An average season for Goff since 2017 is a 63.6 completion percentage with 4,246 yards and 30 touchdowns. Even with some perceived limitations to his game, it's hard to let a 24-year-old quarterback test free agency with that kind of performance.

Los Angeles knows what it has in Goff. He's been a terrific fit in McVay's system and is still at an age at which he can keep getting better.