The Lakers and D’Antoni’s agent, Warren LeGarie, confirmed the deal two days after the Lakers fired Brown five games into the season.

D’Antoni agreed to a three-year deal worth $12 million, with a team option for a fourth season.

D’Antoni got the high-profile job running the 16-time NBA champions only after the club’s top brass extensively discussed the job with former Lakers coach Phil Jackson.

The 11-time NBA champion coach met with Lakers owners Jerry and Jim Buss and general manager Mitch Kupchak on Saturday to weigh a return for a third stint on Los Angeles’ bench.

The Lakers instead went with D’Antoni, a respected offensive strategist who coached Lakers point guard Steve Nash in Phoenix during the best years of their respective careers. D’Antoni was less successful during four seasons in New York, but at least restored the once-moribund Knicks to competence before resigning last March.

“Dr. (Jerry) Buss, Jim Buss and Mitch Kupchak unanimously agreed that Mike was the best coach for this roster at this time,” Lakers spokesman John Black said.

The 61-year-old D’Antoni underwent knee replacement surgery earlier this month, and could be physically limited early his tenure. Black said the Lakers aren’t certain when D’Antoni will travel to Los Angeles to begin work.