The Kansas City Chiefs have signed free agent quarterback Nick Foles, according to Fox Sports’ Mike Garafolo. Foles, 27, asked for his release from the Los Angeles Rams after the team spent a first-round pick on Jared Goff in the 2016 NFL Draft. The team granted his release on July 27.

Foles signed a two-year contract extension with the Rams shortly after they acquired him in a trade with the Philadelphia Eagles, before he ever saw the field for them. Foles played in 11 games and completed just 56.4 percent of his passes for 2,052 yards. He had seven touchdowns against 10 interceptions and was eventually benched in favor of Case Keenum.

His play was lacking enough to convince the Rams that he was not the long-term option at quarterback, prompting them to trade several high picks for the right to draft Goff. The Rams initially claimed there would be a quarterback battle, but Foles wanted no part of whatever they were offering and thought he’d do better elsewhere.

As a member of the Chiefs, Foles will be the backup to the entrenched Alex Smith. NFL Media’s Ian Rapoport reports Foles also fielded offers from the Minnesota Vikings and Dallas Cowboys.

Foles is still trying to replicate the amazing season he had with the Eagles in 2013, when he threw 27 touchdowns against just two total interceptions. He completed 64 percent of his passes for 2,891 yards that season, but threw 13 touchdowns and 10 interceptions in eight games with the Eagles in 2014, prompting his trade to the Rams.

Foles was a third-round pick by the Eagles in 2012. He’s played in 39 career games and has 53 touchdowns and 27 interceptions over the course of his career.