The Eagles agreed to a three-year contract extension with defensive end Josh Sweat on Saturday, marking the second time in as many weekends the team locked up a player they hope will develop into a franchise cornerstone.

Sweat’s deal is worth $40 million, according to his agent. He got $26.92 million guaranteed and could earn a maximum of $42 million depending on incentives.

The deal comes a week after the Eagles agreed to a four-year, $64 million extension with starting left tackle Jordan Mailata.

» READ MORE: Cinderella story of how Eagles discovered Jordan Mailata and trumped the rest of NFL

Sweat, a fourth-round draft pick in 2018 out of Florida State, played roughly 35% of the team’s defensive snaps the past two seasons as a rotational pass-rusher. Coming off a career-high six sacks in 2020, Sweat seemed poised for a breakout season this year as he continues to take on a bigger role. If he put together another promising season, he could have commanded a serious market this offseason.

The 24-year-old split reps with Derek Barnett with the first-team defense during training camp and played 56% of the Eagles’ snaps against the Atlanta Falcons in Week 1.

Former Eagles general manager Joe Banner told The Inquirer prior to the Sweat extension that the Eagles are starting to build a foundation at premium positions by developing players like Mailata and Sweat.

“What I think is really compelling is with a guy like Sweat who is young, with a guy like Mailata, you’re starting to lay the groundwork at the most important positions for long-term continuity with quality players and people,” Banner said. “The good news is, if you had a wish, like, ‘I’ve got some young, developing players that I’m very excited about,’ you would hope they play those positions, so that’s a huge positive. It’s hard to fill those positions with young, improving, quality players and there’s encouraging signs that they’ve done that.”

» READ MORE: Eagles rookie running back Kenneth Gainwell is driven to excel, and it shows

Sweat was considered a high-risk, high-reward player coming into the draft. He measured in at 6-foot-5, 251 pounds and ran a 4.51 40-yard dash, which was best among defensive ends, but a horrific leg injury suffered in high school caused him to slide in the draft.

Sweat’s extension could spell trouble for Barnett’s long-term prospects with the Eagles. The 2017 first-round pick has been a starter since 2018, but has battled several injuries and hasn’t developed into a high-sack edge rusher. He’s playing on the final year of his rookie contract and is set to become an unrestricted free agent in the offseason.

Sweat’s annual value, roughly $13-$14 million per year, puts him in line with recently signed edge rushers like Detroit’s Romeo Okwara and New England’s Matt Judon. Okwara’s deal, which was signed in March, is very similar to Sweat’s. While Okwara has been more productive, it’s important to note the salary cap is expected to go up roughly $20 million this offseason. Sweat is also two years younger than the Lions’ edge rusher.