Ahmad Brooks has led the 49ers in sacks since 2013. AP

The 49ers on Friday said goodbye to their longest-tenured defensive player, one of the few links to their most recent Super Bowl and their most consistent pass rusher in the last five years.

Kyle Shanahan said he had a hard time on Friday morning cutting Ahmad Brooks, who was surpassed by a player nearly 10 years his junior, Eli Harold, in the starting lineup. Brooks, 33, either has led or tied for the 49ers’ team lead in sacks every season since 2013 and his 51 1/2 total sacks rank third in franchise history behind Bryant Young (89 1/2) and Charles Haley (66 1/2).

“It’s a real tough decision,” Shanahan said. “John (Lynch) and I had gone back and forth with it the last few days. Once we really came to the conclusion he wasn’t going to be a part of our final 53, we weren’t going to keep him around just to let him know nine days from now.”

Click to resize

San Francisco has been shopping Brooks for weeks and has received some nibbles.

“Ahmad can still do things,” Shanahan said. “I think everyone knows that. He’s going to help somebody this year.”

Harold not only is a decade younger than Brooks, no two players competing for the same spot have nearly as wide a discrepancy in their salaries. Brooks, who is entering his 12th season, is San Francisco’s fourth highest paid player, and his $6.1 million salary-cap figure dwarfs that of Harold’s $823,000.

In addition, Brooks still is facing sexual battery charges stemming from a 2014 incident at former 49ers teammate Ray McDonald’s home. According to the Santa Clara County District Attorney’s office, a pretrial motion is scheduled for Sept. 29 at which point a trial date will be set.

Harold’s résumé is decidedly more sparse – three career sacks – than Brooks’, but the 49ers believe his upside is greater. He started 13 games last season, at one point bulking up to 270 pounds.

But Harold said he felt too plodding at that weight and this year is down to a more comfortable 252 pounds.

“He’s a physical player who can set the edge,” Shanahan said of Harold. “I think he’s got a lot more in him. I think he can continue to improve. But I love the way he fights. I love the way he competes every day. He’s a guy, to me, who’s trying to be his best every day. I think there’s a lot more to come. Usually guys who have that type of mentality, they usually get better, not worse.”

Both Harold and Brooks played at Virginia and Harold credited Brooks with guiding him when the 49ers drafted him in the third round in 2015.

“It’s sad that I lost a guy I really cared about, grew up watching, went to the same school, from the same state,” Harold said. “… He taught me a lot and I was very fortunate coming into a team that had him and Aldon Smith.”

Harold had two more years on his contract; Brooks was entering his final season. The 49ers also like newcomer Dekoda Watson, a special teams ace who plays strong-side linebacker on defense. In addition, rookie Pita Taumoepenu has played that spot in recent weeks.

Brooks has been a starter on the edge of the team’s defense since then-defensive coordinator Vic Fangio promoted him in 2011, and he’s the second longest tenured 49er after left tackle Joe Staley.

Staley, linebacker NaVorro Bowman, center Daniel Kilgore and tight end Garrett Celek are the only current 49ers who played in Super Bowl XLVII.

Matt Barrows: @mattbarrows, read more about the team at sacbee.com/sf49ers.

This story was originally published August 25, 2017 10:44 AM.