(CNN) -- Inter Milan sacked coach Andrea Stramaccioni Friday and replaced him immediately with Walter Mazzarri.
Stramaccioni departs after a dismal season for the famed Nerazzurri, who finished the season a lowly ninth in Serie A and missed out on European competition.
By contrast, Mazzari, who has been at Napoli for four seasons, has guided them back into the Champions League and they finished second to champions Juventus in this year's standings.
He recently announced he would be leaving at the end of the season and was immediately linked with Inter, who will be appointing their sixth coach since the departure of Jose Mourinho three years ago.
Mourinho guided Inter to the Champions League crown before joining Real Madrid but his old charges have been in decline since that triumph.
Stramaccioni was the latest to attempt to turn it around at the San Siro, but despite the poor results club president Massimo Moratti had kind words.
"I've chosen Mazzarri, I'm sorry for Stramaccioni," he was quoted on the official Inter website.
He added "That takes nothing away from the esteem I hold for Stramaccioni's talent and potential.
"I'm convinced he'll become one of the great Italian coaches but it might also be necessary to save his professional future after a particularly unlucky year, and maybe he needs to find an easier situation than Inter.
"We're coming to a difficult season and I thought we'd need a coach with Mazzarri's experience."
It has left Napoli without a coach, but reports have strongly linked Rafael Benitez with the vacant post after the Spaniard's interim spell at Chelsea ended with a Europa Cup win.
Benitez was Mourinho's first successor at Inter Milan, but was unable to repeat his success.