After just one season as the San Francisco 49ers’ defensive coordinator, Steve Wilks is out.

“This morning I relieved Steve Wilks of his duties,” Niners coach Kyle Shanahan said in an impromptu conference call Wednesday that was scheduled just 10 minutes before it happened. “(We’re) going to end up making a change here at defensive coordinator. A really tough decision, because [it] really says nothing about Steve as a man or as a football coach. I mean he’s exactly what we wanted as a man. He is a great football coach.

“But just where we’re going and where we’re at with our team from a scheme standpoint and things like that, looking through it all throughout the year to these last few days, I felt pretty strongly that this was a decision that was best for organization.”

Shanahan on Tuesday mostly dodged questions about whether Wilks would remain as defensive coordinator for a second season. He said he needed more time to sort through his feelings on his staff, though he did say he expected most of his staff to be back.

By Wednesday morning, Shanahan said he realized that “going a different direction” was “something that I have to do.”

In Wilks’ lone season with the Niners, the defense had its share of ups and downs. A unit that led the NFL in multiple categories in 2022 under DeMeco Ryans — including fewest points per game allowed (16.3) and defensive expected points added (89.58) — took a step back in 2023.

San Francisco still finished third in points allowed (17.5) this season, but the 49ers were ninth in defensive EPA (41.48) and sprung significant leaks against the run in the playoffs, allowing the Green Bay Packers, Detroit Lions and Kansas City Chiefs to average 5.1 yards per carry and 149.3 yards per game in the postseason.