(CNN) -- Italian giants AC Milan have confirmed Massimiliano Allegri as their new coach.
Allegri has signed a two-year contract with Milan and replaces Brazilian coach Leonardo, who left after just one season at the club.
The 42-year-old led Cagliari to mid-table finishes in the last two seasons and recently terminated his contract.
A statement on Milan's official website read: "AC Milan announce that Massimiliano Allegri is the new first team coach. The manager has signed a contract until June 30, 2012."
Leonardo briefly threatened to win the Italian Serie A title but eventually finished third, securing qualification for the lucrative European Champions League.
Allegri says he wants to build on that third-placed finish. He told the club's website: "It's a very important day for me. I'm proud to be able to coach this team and be part of this great club. To the fans I can only say that I'm very happy, and that I will try to obtain the best with this team.
"I replace Leonardo, a coach who has done a good job. Under his leadership, Milan fought until the end for the Scudetto and the team played very well. Therefore I receive a very important legacy.
"Today is the first day. Now I will have all of the time to think and a month available to prepare the new season. Coaching Milan represents a very important point of arrival in my career. I'm part of one of the strongest clubs in the world."