Quarterback Nick Foles, who led the league in passer rating during the 2014 season, was released by the Rams. (AP Photo/Stephen Brashear)

Two years after he led the league in quarterback rating and less than five months after he was handed a $6 million bonus, Nick Foles was released.

“We have been in contact with Nick and his representation throughout the offseason and we feel that this is the best decision for all parties involved,” Los Angeles Rams Coach Jeff Fisher said in a statement. “We appreciate the contributions that Nick has made to our organization in his time as a Ram and wish him the best of luck in his future endeavors.”

That Foles, 27, was unhappy with his situation was widely known and perhaps obvious: Fisher and Co. traded a treasure trove of picks to the Tennessee Titans so that they could select California’s Jared Goff with the No. 1 overall pick in the draft. The move was ostensibly made to replace Foles, who the Rams traded Sam Bradford for last year, so he skipped the team’s offseason workouts and requested the release. He may not have smiled since December.

While his best years are almost certainly behind him, there are three landing spots he should consider.

San Francisco 49ers

Chip Kelly’s system and team ethos may have alienated all of Philadelphia and the Eagles’ organization, but Foles thrived as his signal caller. Now in San Francisco, the much-maligned coach has the unenviable choice of deciding to start Blaine Gabbert or Colin Kaepernick in Week 1.

Foles could realistically show up at camp in cargo shorts and UGG boots and win the starting job. Need more reason to shudder at San Francisco’s current predicament? Pro Football Focus ranked the 49ers’ quarterback situation the second-worst in the league — and that was before Ryan Fitzpatrick signed with the New York Jets.

While in Philadelphia, Kelly allowed Foles to take shots down the field, which has been his most marketable strength since his college days at Arizona. He led the league in 2013 in yards per attempt (9.7), touchdown rate (10.3 percent) and quarterback rating (126) on first down. Taking into account all downs, Foles led the league in yards per attempt (9.1) and quarterback rating (119.2).

However, that changed when he arrived in St. Louis, where he was rarely allowed to test the secondary. He ranked 34th in yards per attempt (6.1) last season, posting the lowest mark of his career in not only yards per attempt, but touchdown percentage (2.1), completion percentage (56.4) and quarterback rating (69).

Moreover, San Francisco needs all the help it can get offensively. Under Jim Tomsula, the offense ranked no higher than 20th in Football Outsiders’ weighted offense metric, passing offense, rushing offense and scoring offense. The 49ers were the only team in the league that failed to score 15 points per contest, amassing 37 fewer points than any another franchise. As it pertains to Foles, San Francisco ranked dead last in passing yards per first down attempt in 2015, and Kelly will be looking to buck that trend. What better way than injecting an arm you’ve depended on before and a mind capable of running your complicated system?

Denver Broncos

Like San Francisco, Denver is in need of a quarterback.

With the retirement of Peyton Manning and Brock Osweiler’s soap opera-like departure, Coach Gary Kubiak will decide between a player best known for a butt fumble (Mark Sanchez), a 24-year-old without a single career start (Trevor Siemian) and a 22-year-old rookie, who is as green as any player on the roster (Paxton Lynch).

While Foles didn’t have much in the way of talent at wide receiver as he had with the Rams, he would enter a system touting two wide receivers — Emmanuel Sanders and Demaryius Thomas — who ranked in the top 60 in Defense-adjusted Yards Above Replacement last season. The Rams, for context, had one player — Kenny Britt — ranked in the top 85. Foles would have a tight end in Virgil Green, who is coming off a career year, and an incoming talent in Jeff Heuerman.

With playmakers capable of stretching the field to throw to and an improved offensive line, Foles should consider joining the defending champs.

Kansas City Chiefs

Although he wouldn’t have a chance to win the starting job by Week 1, or perhaps at all, barring injury, there are worse situations than being Alex Smith’s backup. With Chase Daniel following Doug Pederson to Philadelphia, that spot is ripe for the taking.

There’s history here: Andy Reid reportedly demanded that the Eagles take Foles instead of Kirk Cousins in the 2012 draft.

The Chiefs’ mostly lethargic offense last season was predicated on limiting turnovers and churning out lengthy, if exhausting to watch, offensive drives. At 5.56 plays per drive, the Chiefs were among the best last season at preventing three-and-outs and keeping opposing defenses on the field.

Kansas City picked up two wide receivers — Demarcus Robinson and Tyreek Hill — in the draft to pair with the returning Jeremy Maclin and Chris Conley. Add in Travis Kelce, one of the league’s best tight ends, and you’ve got a tantalizing crop of receivers to work with.

While the Chiefs’ offensive line is a work in progress, graded by Pro Football Focus as one of the 10 worst in the NFL, Foles has proven in the past to be deft at diagnosing and producing against the blitz.