The Philadelphia Eagles have signed franchise quarterback Carson Wentz to a four-year extension through the 2024 season, the team announced Thursday.

The extension is for $128 million and includes $107.9 million guaranteed, including $66 million due at signing, a source told ESPN's Adam Schefter. The extension can escalate to a max of $144 million. Wentz's total deal is now six years for $154 million and can grow to a max of $170 million.

The #Eagles and Carson Wentz have agreed to terms on a four-year contract extension through 2024.



📰: https://t.co/2SuuznqaoX pic.twitter.com/8ze1NlcWt2 — Philadelphia Eagles (@Eagles) June 6, 2019

The extension is similar to the one the Seattle Seahawks gave Russell Wilson, who signed a four-year, $140 million extension with $107 million in guarantees in April.

The Eagles have been open about their desire to lock Wentz into a megadeal. Howie Roseman, the executive vice president of football operations, said at the owners meetings in March that "having Carson here long-term is our goal" and the organization will "work toward that." Chairman/CEO Jeffrey Lurie added he would "absolutely" be comfortable extending Wentz this year, even though Wentz is coming off two significant injuries and was under contract through 2020.

The price for premium quarterbacks is only going to go up, and with Patrick Mahomes eligible for a contract after this season, the cost could soon skyrocket. By extending Wentz now, the Eagles assume some significant risk but will save millions on the back end if Wentz returns to MVP form, as they expect him to.

Wentz said in a video posted on his Twitter account that he was excited to re-up with Philadelphia.

"I can't even explain to you how excited I am right now to be a part of this great city for this many more years," Wentz said. "From the moment I got drafted here, I knew this place was special."

The second overall pick in the 2016 NFL draft, out of North Dakota State, Wentz has been dynamic when on the field, but his short NFL career has been marred by injuries. After playing in all 16 games as a rookie, he has missed eight games over the past two seasons, including five last year.

In December 2017, Wentz tore his ACL and missed the team's final three games of the regular season and entire postseason run to a Super Bowl title. The injury also forced him to miss the first two games of 2018.

Wentz returned in Week 3 to put up a 5-6 record in 11 games before suffering a stress fracture in his back that forced him to miss the final three games of the season. He finished with 3,074 yards, 21 touchdowns and seven interceptions with a 69.6% completion rate.

Wentz was a full participant in OTAs and hasn't looked this healthy since 2017. He is no longer in the knee brace that restricted his movement last season and does not plan to wear one during games this season. Neither Wentz nor coach Doug Pederson would say whether the stress fracture in his back has fully healed, but Pederson said he was not putting any limitations on his quarterback for this portion of team activities.

Before his injury in 2017, Wentz was having an MVP-caliber season. He led the team to an 11-2 record and finished the year with 3,296 passing yards, a single-season team record 33 touchdowns and just seven interceptions. He was named a Pro Bowler and second-team All-Pro and finished third in MVP voting behind Tom Brady and Todd Gurley II.

As a rookie, Wentz threw for 3,782 yards and 16 touchdowns and had 14 interceptions. He set an NFL rookie record with 379 completions.

ESPN's Tim McManus contributed to this report.