By STEVE MEGARGEE AP Sports Writer

Green Bay Packers outside linebacker Rashan Gary announced Monday that he agreed to a four-year contract extension, bringing a bit of good news to a team that has lost four straight games.

Gary announced the four-year, $107 million extension that included a $34.6 million signing bonus on social media. A person familiar with the situation told The Associated Press that Gary can earn $107 million through the end of a deal that now runs through 2027 because he’s receiving about $96 million in new money to go along with his 2023 salary of $10.8 million. The person spoke on the condition of anonymity because the team hasn’t announced the extension or terms.

“Thanks to everyone in the Green Bay Packers organization, my family, business team, NFL, friends, fans & supporters for taking the ride with me,” Gary said in his post. “The grind doesn’t stop. Sacrifices lead to achievable goals.”

This deal gives the slumping Packers (2-5) a long-term commitment from one of their top overall players. Gary was eligible to become a free agent after the season if he hadn’t agreed to an extension.

Gary, who turns 26 on Dec. 3, has a team-high 4 ½ sacks even though he was playing limited snaps early in the season as he worked his way back from a torn ACL. He only started playing more than half the Packers’ defensive plays in their last two games, a 19-17 loss at Denver and a 24-10 home defeat against the Minnesota Vikings.

He recorded 9 ½ sacks in 2021 and had six more last year despite playing just nine games before his season-ending ACL injury.

Gary has spent his entire career with the Packers, who selected him out of Michigan with the 12th overall pick in the 2019 draft.