He agreed to a five-year, $25 million deal Wednesday, said his agent, former Jets general manager Mike Tannenbaum. The Knicks offered Kerr a four-year contract, reports said.

Kerr, a TNT broadcaster who has no head-coaching experience, was considered a favorite for the Knicks job for months because of his relationship with Phil Jackson, his former coach with the Bulls who is now the Knicks’ president.

Kerr’s family lives in San Diego, and his West Coast ties might have been a major factor in his decision.

He replaces Mark Jackson, who was fired after three seasons despite leading the Warriors to a 51-31 record this season.

The Knicks fired coach Mike Woodson and his entire staff after going 37-45.

It’s unclear whom the Knicks might turn to next. Mark Jackson, a former Knick, is one of the more attractive options on the market, but he might not fit into Phil Jackson’s vision for building the team. Current Tunder player and former Laker Derek Fisher, who plans to retire after this season, and ex-Bull Bill Cartwright, rumored to be an assistant coaching candidate if Kerr had joined the Knicks, might be potential targets with experience in Phil Jackson’s triangle offense.