The Kansas City Chiefs have agreed to terms with free-agent quarterback Nick Foles, reports NFL Network's Mike Garafolo, citing a source.

Foles will be reunited with head coach Andy Reid, who drafted him to the Philadelphia Eagles in 2010.

The Minnesota Vikings and Dallas Cowboys, who lost backup Kellen Moore to a broken ankle Tuesday evening, were among several teams reportedly interested in Foles' services.

NFL Network's Ian Rapoport reports both the Cowboys and Vikings had also made offers to Foles.

The 27-year-old quarterback will likely fill the backup role behind Alex Smith in Kansas City, but could get a chance to compete for the starting job.

He was released by the Los Angeles Rams in late July after losing his starting job in the 2015 season and then his backup duty after the team selected quarterback Jared Goff first overall.

Foles started six games for Reid in his rookie season, recording 1,699 yards, six touchdowns, and five interceptions. He has started 35 games in his four-year career.

The Chiefs also recently re-signed offensive tackle Eric Fisher to a four-year extension, but have yet to sign franchise safety Eric Berry, who is currently holding out form training camp.