Updated

Baltimore Ravens quarterback Joe Flacco has agreed to a new three-year contract extension through the 2021 season, FOX Sports NFL Insider Peter Schrager confirms.

The financial terms of the deal aren't yet known, but the goal of the extension was to spread out the salary cap hit the team was scheduled to take on Flacco's last contract.

Flacco, 31, has spent his entire eight-season NFL career with the Ravens, who drafted him 18th overall in 2008. He signed a six-year, $120.6 million deal prior to the 2013 season that made him the highest-paid player in the league at the time.

This past season, he passed for 2,791 yards and 14 touchdowns with 12 interceptions in 10 games. He suffered a torn ACL and MCL in his left knee in a Nov. 22 win over the Rams and missed the rest of the season.

In eight seasons with Baltimore, he has 28,322 passing yards, 162 touchdown passes and 102 interceptions. He has completed 60.9 percent of his passes and has an 84.7 QB rating.

Flacco has been to the postseason six times and was the MVP of the Ravens' Super Bowl 47 win over the 49ers.