Updated

The San Francisco 49ers signed punter Andy Lee to a six-year contract extension Wednesday that will keep him with the team through the 2018 season.

A sixth-round pick by San Francisco in the 2004 draft, Lee has spent his entire career with the 49ers. He holds the team records in punts (723), yards (33,069), gross average (45.7), net average (38.9) and punts downed inside the 20-yard line (209).

"The 49ers are pleased to have reached a long-term contract extension with Andy," said general manager Trent Baalke. "Andy has established himself as one of the top players in the game at his position. He is a valued member of our organization and community. As we stated earlier this year, it is our objective to keep the core of this team together long term, and this is just another step in that direction."

The three-time Pro Bowl selection set the NFL single-season record in net punting average last season with 44.0 yards per punt. He also set San Francisco's single-game punting records on September 11 of last season with a 59.6-yard gross punting average and a 54.2-yard net average.