The 49ers have made their first mark during the NFL's open negotiating period with an agreement to sign former Tampa Bay Buccaneers linebacker Kwon Alexander, a league source told NBC Sports Bay Area.

The 49ers confirmed the contract on Thursday.

The contract is a four-year deal worth $54 million, NFL Media's Ian Rapoport reported Monday. It contains $27 million in guaranteed money, according to ESPN’s Adam Schefter. Agent Drew Rosenhaus represents Alexander, who tweeted his reaction to the deal.

The 49ers were looking to strike early in the free-agent market and add a linebacker to start alongside Fred Warner, who led the team in tackles as a rookie last season.

On Friday, the 49ers restructured the contract of linebacker Malcolm Smith to retain him on the roster, but the move did not have any impact on the team’s need for help at linebacker.

The move to sign Alexander was necessitated due to the failure of Reuben Foster, whom the 49ers selected in the first round of the 2017 NFL Draft. After several off-the-field incidents and arrests, Foster's time with the 49ers came to an end with his release in November.

 

Alexander, 24, is coming off a torn ACL in his left knee, which he sustained Oct. 21 while blitzing against Cleveland Browns quarterback Baker Mayfield. Alexander entered the league as a fourth-round draft pick from LSU in 2015.

Alexander recorded more than 90 tackles in each of his first three NFL seasons. In 2016, he had 145 tackles, including 108 solo stops, along with three sacks and one interception. After being snubbed for the Pro Bowl that season, Alexander was named to his first Pro Bowl after the 2017 season.

[RELATED: Giants still in trade discussions involving Odell Beckham Jr.]

Alexander recorded 380 tackles and seven sacks with six interceptions and 22 passes broken up in his 46-game NFL career. He has started every game in which he appeared.