ALLEN PARK -- Reggie Bush will spend the twilight of his career back in the state where it all started.

The California high school legend and former Detroit Lions tailback has agreed to a deal with the San Francisco 49ers, according to ESPN. He was also drawing reported interest from the Patriots.

Bush spent the past two seasons in Detroit, after inking a four-year, $16 million deal with the club in 2013. He rushed for 1,006 yards that year, becoming the first Lions tailback to hit the 1,000-yard threshold since Kevin Jones in 2004.

But Bush's production declined precipitously in 2014, due largely to a series of ankle injuries that held him out of five games and limited him in several others. He finished with 76 carries for 297 yards, the second-worst season of his nine-year career.

Detroit general manager Martin Mayhew commended Bush for playing through pain last year, particularly in the playoff game against Dallas.

"He's a warrior," Mayhew said last month. "I mean, that Dallas game, he was hurt. He went out and played his butt off in that Dallas game. I thought he gave everything he had, and I have great respect for guys who are able to do that.

"Some guys get nicked up, and they can't play. That's just a reality. We know that about some players -- that, 'If this guy isn't quite right, we're probably not going to see him this weekend.' We could know that on Monday or Tuesday. But Reggie fought through some things throughout the entire season, and was able to get on the field and compete, and that means a lot to me. I think the locker room respects him, and I have great respect for him for that reason."

There are certain realities in the NFL, though, and Mayhew ultimately decided the Lions were best off going younger and cheaper at the position. They saved $1.7 million in cap space by cutting the 30-year-old Bush.

Detroit returns Joique Bell and Theo Riddick at running back in 2015, and is expected to add another back in next month's draft.

Bush, meantime, has found new life by returning to California.

He initially burst onto the scene as a high school football legend at La Mesa Helix High School, located just east of San Diego, and became one of the greatest college players ever during his three seasons at USC.

He won the Heisman Trophy in 2005, though it was later taken away due to NCAA violations.

Bush now joins a San Francisco backfield that also includes Jarryd Hayne, a former rugby star who once appeared like he was going to sign with Detroit.

-- Download the Detroit Lions MLive app for iPhone and Android

-- Follow Kyle Meinke on Twitter

-- Like MLive's Detroit Lions Facebook page