The NFL Insiders crew explains why the 49ers decided to hire Chip Kelly and discusses the amount of say he will have in personnel. (1:41)

The San Francisco 49ers have hired Chip Kelly to be their coach, 11 days after firing Jim Tomsula following a 5-11, one-and-done season.

The 52-year-old Kelly, who was fired in his third season as coach of the Philadelphia Eagles with one week to go in the regular season, will receive a four-year deal worth $24 million from the 49ers, a league source told ESPN NFL Insider Adam Schefter.

Kelly had interviewed with the 49ers last week.

"As one of the most historic franchises in the National Football League, I realize the high standards and expectations that this position demands and I embrace the challenges ahead," Kelly said in a statement. "My immediate focus is to build the best coaching staff possible, one that will maximize the abilities of each of our players and put us in the best position to win football games."

49ers CEO Jed York tweeted that he and general manager Trent Baalke selected Kelly, who will be introduced in a news conference next week, "after a thorough search."

After a thorough search, Trent & I are thrilled to announce Chip Kelly as the new #HeadCoach of the @49ers — Jed York (@JedYork) January 14, 2016

Wide receiver Torrey Smith also tweeted about the hiring Thursday.

Guess I might have to start running right now to get in shape — Torrey Smith (@TorreySmithWR) January 14, 2016

Kelly fits the criteria set forth by York and Baalke as a veteran coach with a big name and a clear vision -- a quick-strike offensive philosophy. It should be interesting to see how Kelly, who wanted a big say in personnel control in Philadelphia, interacts with Baalke, who, despite saying there is no iron fist in the organization, has a reputation as a personnel hard-liner.

"Chip possesses all the qualities we were looking for in our next head coach," Baalke said in a statement. "He has demonstrated the ability to be innovative everywhere he has coached and has had great success throughout his career. Chip's passion for the game and vision for the future of this team clearly stood out to us during the search process. He is an extremely driven individual that I look forward to working with."

Kelly, who went to Philadelphia after four seasons as coach at Oregon, had consecutive 10-6 seasons with the Eagles before this season's flameout, which began with controversy over his handling of the roster.

He is just the second 49ers head coach since the 1970 AFL-NFL merger who has had previous NFL head-coaching experience (not counting Tomsula, who was an interim coach for one game before his hire). The other was Dennis Erickson, who went 9-23 in 2003 and 2004.

Kelly already has a connection with Niners senior personnel executive Tom Gamble, who had been with Kelly in Philadelphia.

Kelly was the first coach in Eagles history (and second in NFL history) to win a division title in his first season -- Philadelphia lost a wild-card round game to the New Orleans Saints -- and his 26 wins are tied with Ray Rhodes for third most by an Eagles coach in his first three seasons.

Speed meets speed Chip Kelly's Eagles team averaged a play every 22.7 seconds in 2015, the fastest rate in the league by more than three seconds. But the 49ers were quick off the ball too, ranking fifth in time per play. Shortest average time of possession per play - 2015 Team Time* Eagles 22.7 Giants 26.0 Texans 26.2 Jaguars 26.4 49ers 26.5 * In seconds

-- ESPN Stats & Information

The Eagles averaged a play once every 23.1 seconds of possession under Kelly, three seconds faster than any other team, per ESPN Stats & Information.

Philadelphia owes Kelly about $13 million over the next two years, but that total will be offset by the deal Kelly signs with San Francisco, a league source told ESPN's Darren Rovell.

Being an offensive-minded coach, Kelly fits the same bill as the seven candidates the Niners interviewed after they finished 31st in the league in total offense and last in scoring: Buffalo Bills assistant head coach/running backs coach Anthony Lynn, Cleveland Browns offensive coordinator John DeFilippo, Tampa Bay Buccaneers offensive coordinator Dirk Koetter, Cincinnati Bengals offensive coordinator Hue Jackson, former New York Giants coach Tom Coughlin and former Denver Broncos and Washington coach Mike Shanahan.

"Chip has a proven track record at both the college and NFL levels that speaks for itself," York said in a statement. "We believe strongly that he is the right man to get this team back to competing for championships. I look forward to watching Trent and Chip work closely to build a team that will make us all proud."

The 49ers had narrowed their finalists to Kelly and Shanahan earlier Thursday, sources told ESPN NFL Insider Adam Schefter.

Kelly's may also offer possibilities for quarterback Colin Kaepernick, who is recovering from three surgeries -- left shoulder, right thumb and left knee -- and who was thought to be done in Santa Clara but whose skill set fits Kelly's offense.

Kaepernick's $11.9 million salary for 2016 becomes fully guaranteed for injury come April 1, and many had believed the team might try to trade or release him.

The Associated Press contributed to this report.