Nick Foles and the St. Louis Rams have agreed upon a two-year extension through 2017 worth just over $24.5 million.

Foles will receive almost $14 million in guaranteed money.

Foles can void the final year of the deal based on Pro Bowl or team performance.

Foles was due $1.5 million in the final season of his rookie contract.

The Rams acquired Foles this past offseason from the Philadelphia Eagles.