The Raiders released punter Marquette King on Friday in perhaps the most unexpected move yet under their new coaching staff.

King, 29, had been with the Raiders for five seasons and was among the league’s best at the position. He was a second-team All-Pro in 2016 and last season ranked third in the NFL in net average (42.7 yards)and pinned opponents inside the 20-yard line on 40.6 percent of his punts.

The Raiders signed King to a five-year, $16.5 million contract extension in February 2016 and were due to pay him $3.05 million in 2018. By cutting him they will save $2.9 million against the salary cap, according to spotrac.com.

The Raiders have one punter on their roster in UC Davis product Colby Wadman, whom they signed earlier this month.

Wynn Silberman, King’s agent, said King’s salary was likely a primary factor in the move under new head coach Jon Gruden and special teams coach Rich Bisaccia.

“I think we’re all a little surprised,” Silberman said. “Based on my conversations with (general manager) Reggie (McKenzie) and Oakland over there, we’re still trying to figure out exactly the reasons. That being said, I think it’s reasonable to consider there might be a change in philosophy on where you emphasize and invest in positions.

“Obviously there’s a new regime coming in. And we certainly are aware there’s a great new special teams coach coming in and he has a real reputation for being a true traditionalist that coincides exactly with the philosophy coach Gruden has. I’ll leave it at that.”

Silberman said King had gone to the Raiders’ facility Friday to meet the new coaching staff. Some of the coaches were away, but McKenzie was there and gave King the news, Silberman said.

Signed as an undrafted free agent out of Fort Valley State in 2012, King became the Raiders’ primary punter in 2013 after the departure of Shane Lechler. Over the past five seasons, King averaged 46.8 yards per punt and pinned opponents inside the 20 on 156 of 426 attempts.

King became known for his exuberant celebrations — including pretending to ride a horse off the field — and his antics sometimes got him into trouble. In 2016, he was fined for picking up and dancing with a referee’s flag after drawing a roughing the kicker penalty. Last season, he was flagged for unsportsmanlike conduct and subsequently fined for throwing the football at a Broncos player after a failed fake punt.

Some wondered if King would have to tone down his personality under Gruden. Instead, he becomes the latest player involved in an overhaul of the Raiders’ special teams. The Raiders let longtime kicker Sebastian Janikowski (the franchise’s scoring leader) and long snapper Jon Condo leave in free agency and also traded Cordarrelle Patterson, their primary kick returner last season, to the Patriots. Kicker Giorgio Tavecchio is expected back, and the Raiders signed long snapper Andrew DePaola this month.

King, who was also Oakland’s primary holder on field goals and extra points, is now an unrestricted free agent. Silberman expects King to generate plenty of interest.

“He hasn’t even hit his prime,” Silberman said. “Certainly, there’s going to be a team out there this season that has a vicious weapon.”

Other moves: The Raiders announced they have waived tight end Clive Walford and re-signed safety Reggie Nelson. Walford, a third-round draft pick in 2015, played 44 games for the Raiders, recording 70 catches for 768 yards. Nelson started every game at free safety for Oakland the past two seasons. He is expected to return in a backup role after the team signed safety Marcus Gilchrist.

Matt Kawahara is a San Francisco Chronicle staff writer. Email: mkawahara@sfchronicle.com Twitter: @matthewkawahara