Derek Fisher is finalizing a five-year, $25 million agreement to become coach of the New York Knicks, league sources told Yahoo Sports.

After Knicks president Phil Jackson lost his top coaching candidate, Steve Kerr, to the Golden State Warriors, Fisher became Jackson’s primary target and the 18-year NBA veteran will retire to take the job.

Fisher, 39, had been seeking the same five-year commitment the Knicks had given Jackson to be president, sources told Yahoo Sports.

It is immediately unclear whether the fifth year is guaranteed or includes a team option.