Lorenzo Pellegrini scored a last-gasp winner as Roma bounced back from their Italian Cup defeat by Spezia with a 4-3 win over the promoted side to move third in Serie A on Saturday.
Pellegrini blasted home in injury time, minutes after Daniele Verde had pulled Spezia level, with relieved Roma coach Paulo Fonseca racing to hug the midfielder.
“The hug was a team moment that shows that we are all together,” said Fonseca. “We showed great spirit. It was a game which was essential for us to win.”
The capital side have been in turmoil since their chaotic 4-2 extra-time loss to Spezia on Tuesday.
The official scoreline was changed to 3-0 on Friday, as Roma made six substitutions, with just five allowed, during the last-16 clash which they finished with nine men.
Captain Edin Dzeko was left out of the team on Saturday, officially because of a muscular injury, but amid reports of a fall-out with Fonseca.
Borja Mayoral scored a double for the hosts, netting the first after quarter of an hour, only for Roberto Piccoli to pull 14th-placed Spezia level seven minutes later by pouncing on a mistake by home goalkeeper Pau Lopez.
Real Madrid loanee Mayoral slotted home his second on 52 minutes, before Rick Karsdorp tapped in to make it 3-1 three minutes later.
Diego Farias again responded for the visitors just before the hour, scoring the third goal of a dramatic six-minute spell at the Stadio Olimpico.
An error from Chris Smalling allowed former Roma winger Verde to equalise in the 90th minute, firing home left-footed after the England defender missed his attempted clearance.
Pellegrini had the final say, though, drilling the ball into the roof of the net from close range after Bruno Peres’ unselfish cutback.
It was a first league win in three games for Roma, after last week’s defeat by Lazio in the Rome derby and a draw with title rivals Inter Milan.
Roma move ahead of Napoli into third, six points behind leaders AC Milan who host Atalanta later on Saturday.
Inter Milan are second, three points behind AC Milan, ahead of their match at Udinese.