(CNN) -- Coach Luciano Spalletti has parted company with Roma following the Italian club's poor start to the Serie A season, with former Juventus manager Claudio Ranieri replacing him.
Luciano Spalletti has ended his four-year tenure at Roma after coming under attack from fans.
Speculation had been rife that the 50-year-old Spalletti would quit following Sunday's 3-1 home defeat by Juve, which followed the 3-2 opening day loss to Genoa.
Spalletti met with the capital club's president Rosella Sensi on Tuesday morning before confirming his resignation to reporters.
"I offered my resignation and the club has accepted it," he said.
Roma confirmed on Wednesday that former Juventus, Valencia and Chelsea coach Ranieri would take over ahead of the club's next match against Siena on September 13.
He has signed a two-year contract.
Ranieri, who began his playing career at Roma in 1973, earlier confirmed that he wanted the job.
"This is a great satisfaction for me," he said. "This is a dream come true as I follow a professional journey that began many years ago. I am honoured and convinced I will be able to do and give the best for Roma."
Spalletti joined Roma in 2005 after guiding unfancied Udinese to fourth place in Serie A and qualification for the Champions League the previous season.
He turned around Roma's fortunes, winning two Italian Cups and providing the main opposition for Italian champions Inter Milan following the match-fixing punishments handed out to Juventus and AC Milan.
However, last season's sixth placing was the worst of his reign in the Eternal City, and he came under fire from fans after a lack of major summer signings and then the club's poor start to the 2009-10 campaign.
Midfielder Alberto Aquilani was sold to English club Liverpool, while defenders Nicolas Burdisso and Marco Motta joined from Inter Milan and Udinese respectively.
Roma are drawn with England's Fulham, Swiss side Basle and CSKA Sofia of Bulgaria in Group E of the second-tier Europa League.