All-Pro linebacker Fred Warner and the 49ers agreed Wednesday on a five-year, $95 million extension that will tie him to San Francisco through the 2026 season, sources tell ESPN’s Adam Schefter.

Warner, who was entering the last year of his current deal, will receive $40.5 million guaranteed as part of the extension, a source told Schefter.

The $40.5 million is the second-highest guaranteed total for a non-edge-rushing linebacker in the NFL, according to ESPN Stats & Information, behind C.J. Mosley‘s $51 million guaranteed with the New York Jets.

Warner, 24, said earlier this offseason that he wanted to be a “Niner for life.” The former third-round draft pick was selected to the Pro Bowl for the first time last season after recording 125 tackles and two interceptions.

Warner ranks seventh in the NFL in tackles since 2018 (366), and is one of two players with at least 250 solo tackles (252) and more than 15 pass breakups (16) over the last three years, joining Seattle’s Bobby Wagner.