Jamaal Williams has been arguably the heart and soul of the Detroit Lions this season — dating back even to training camp when the franchise was featured on “Hard Knocks.”

Perhaps it was appropriate, then, that BYU’s all-time leading rusher set a team record Sunday night, one previously held by a Hall of Famer.

Williams scored two rushing touchdowns Sunday night in the Lions’ 20-16 win over the Green Bay Packers, giving him 17 rushing touchdowns for the season.

That rushing touchdown total not only led the NFL in 2022, it broke Barry Sanders’ single-season rushing touchdowns Lions record set in 1991.

“I wanted to congratulate you on an awesome year and for breaking my record, which was the most rushing touchdowns by a Detroit Lion in a single season,” Sanders said in a video message shared by the team. “Awesome job, man. You’ve been a big part of the success this year, and I know you’re just getting started. Great job.”

While the Lions came up just short of making the playoffs — Seattle instead earned the No. 7 (and final) NFC spot Sunday with an overtime win — Detroit prevented Green Bay from advancing to the postseason.

The Packers just needed a win to be playoff-bound, but Williams helped eliminate his former team.

Both of Williams’ scores put the Lions ahead in the second half.

The first came midway through the third quarter, as Williams punched the ball in from 1 yard out to give Detroit its first lead of the game at 13-9.

After Green Bay retook the lead, Williams capped a 13-play, 75-yard drive with the go-ahead score on a third-and-goal run. The 1-yard touchdown run put the Lions back up 20-16 with 5:55 to play.

Williams, playing against the team that drafted him in 2017, had a team-high 72 rushing yards.

He also passed 1,000 yards rushing on the season, needing just 6 yards going into the final week of the regular season to hit the 1,000-yard milestone for the first time in his career.

He finished a career year with 1,066 rushing yards.

Earlier Sunday, another former BYU running back, Tyler Allgeier, also passed the 1,000-yard rushing mark for the season, as he ran for 135 yards for Atlanta to finish the year with 1,035.

Williams and Allgeier are the first two former BYU running backs to run for 1,000 yards in a season at the NFL level.

Green Bay Packers quarterback Aaron Rodgers talks with Detroit Lions running back Jamaal Williams following an NFL football game Sunday, Jan. 8, 2023, in Green Bay, Wis. The Lions won 20-16. | Morry Gash, Associated Press

Williams dedicated breaking the Lions record to his great-grandfather.

“I’m just grateful to do this for him. ... I’m just grateful to have him in my life and grateful to play football,” he said on the NBC broadcast following the game.

“There’s a lot of memories, a lot of emotions right now, but I’m grateful to play this game for my great-grandfather. I know he’s looking down on me, I know I am making him proud.”