Stacy Revere/Getty Images

Veteran pass-rusher Clay Matthews agreed to a two-year contract with the Los Angeles Rams, the team announced Tuesday.

Matthews took to Twitter to celebrate the news:

Matthews spent the first 10 years of his NFL career with the Green Bay Packers, who selected him with the 26th overall pick of the 2009 draft.

While the 32-year-old was one of the longest-tenured players on Green Bay's roster, his departure isn't all that surprising. He finished the 2018 season with 43 combined tackles and a career-low 3.5 sacks, which continued his downward trend.

After earning six Pro Bowl trips in his first seven seasons, Matthews hasn't returned since 2015.

Injuries have played a role in his decline. He battled a nagging shoulder problem along with ankle and hamstring injuries in 2016, when he missed four games and made only nine starts. A year later, he missed two games as a result of groin and hamstring issues.

Last September, Packers beat writer Bob McGinn reported Green Bay was already preparing for a future without Matthews: "I'm told that the Green Bay Packers reached this conclusion some time ago. I'm also told that, if the season were to end today, they have no intention of re-signing Matthews after his contract expires at the end of the season."

Matthews didn't give the Packers a compelling reason to change their minds during the 2018 campaign.

In January, Pro Football Focus' Michael Renner noted edge-defender was Green Bay's biggest need this offseason: "While Nick Perry's contract is such that it might not make sense to cut him, he hasn't come close to justifying his big payday yet. He and Clay Matthews both finished 86th out of 109 qualifying edge defenders in pass-rushing productivity."

ESPN.com's Rob Demovsky suggested it might have made sense to bring Matthews back if he shifted to inside linebacker, but Matthews always seemed to prefer playing on the outside.

Perhaps Matthews will be motivated to prove the Packers wrong for letting him walk in free agency.

Jordy Nelson carried a similar chip on his shoulder after he signed with the Oakland Raiders and proceeded to have a solid year before the Raiders cut him this offseason. He caught 63 passes for 739 yards and three touchdowns.

Regardless of whether revenge provides Matthews with a source of inspiration, the Rams are expecting him to bounce back in 2019.

Last season, the Rams were 15th in sacks and 19th in adjusted sack rate, per Football Outsiders. An edge-rusher was among Los Angeles' needs heading into the offseason.

The only question is whether the team intends to have Matthews line up on the left side of the defense, which is where Dante Fowler Jr. primarily stayed during the second half of the 2018 season.

The Rams signed Fowler to a one-year, $12 million deal last week, so he'll continue to occupy a key role for the team.

Perhaps Los Angeles intends to move Matthews back to the inside, or head coach Sean McVay may see him as a depth option behind Fowler and Samson Ebukam.