Stefano Pioli has signed a new two-year deal to remain as AC Milan boss until June 2022.
The 54-year-old Italian become head coach in October 2019, initially on a deal to the end of the season and has guided the side to fifth in the table with just three games to go.
Initially it was thought Pioli, who has previously managed Lazio, Inter and Fiorentina, would be replaced at the San Siro by Red Bull's Head of Sport and Development Ralf Rangnick.
On the new deal, AC Milan's CEO Ivan Gazidis said: "Stefano has shown he can deliver the vision of football we have for our club - exciting, progressive and passionate.
"This is not a decision based on recent victories, but one based on how Stefano has built team spirit and unity of purpose, the way he has improved the performances of the individual players and the collective team, the way he has embraced our vision and the way he has represented himself and the club's values."
Pioli added: "I am happy and proud of the trust I have received from AC Milan. I want to thank everyone, including our fans, who we are really missing at the stadium, but are always close and supportive.
"As I have said many times, our future is today: we must be focused and determined, be united and play as one. We are at the beginning of an extraordinary path. If we keep working this way, we will grow and be more and more competitive."