(CNN) -- AC Milan coach Leonardo has left his position with the Italian Serie A giants by mutual consent.
The 40-year-old Brazilian signed a two-year contract with the Rossoneri at the start of the season.
However, his future has been in doubt for several weeks following a poor run of results that saw the San Siro club drop tamely out of the Scudetto title race.
Leonardo, who was a Milan hero as a player, told a news conference on Friday: "We are here to announce that we are parting ways through mutual consent, in a calm and serene manner, just as it has always been in our relationship throughout the years.
"The Champions League aim, which I desired so much, has been achieved and this morning we have decided to make it official. The time to end this adventure has come."
Leonardo took over the Milan reigns from Carlo Ancelotti but, despite leading the club to third place in the table, he has faced mounting criticism from media and fans alike for failing to mount a sustained challenge in both Serie A and the Champions League -- where they were crushed by Manchester United at the last 16 stage.
The Rossoneri also suffered a shock Coppa Italia defeat at the hands of Udinese earlier in the season.
Milan's final match of the season is at home to Juventus and -- despite losing three of their last four matches -- they are guaranteed third position regardless of the result.