Edin Dzeko scored twice but Roma needed a third goal from Diego Perotti to survive a Pescara comeback and triumph 3-2 in the capital.
The Bosnian striker reached 12 goals for the Serie A season with a quickfire early brace before Ledian Memushaj made it a contest after half-time.
Had Perotti not then stuck away a spot-kick, Gianluca Caprari's powerful left-footed finish would have denied Roma their share of second with AC Milan.
Pescara's defenders might well have watched Dzeko running riot on his way to scoring a hat-trick against Viktoria Plzen on Thursday but they did not seem to heed the warning as he was able to cut through and notch inside seven minutes at the Olimpico.
And three minutes after turning Perotti's cross beyond Albano Bizzarri he was back among the goals, slamming an assist from the same player over the Pescara goalkeeper's shoulders.
Bizzarri kept Radja Nainggolan out and watched Dzeko shoot wide before the break, over which the visitors resolved to try harder.
They tested Wojciech Szczesny through Simone Pepe and Valerio Verre before, on the hour mark, Memushaj halved the deficit with a killer touch on Francesco Zampano's pass.
Roma, however, were able to re-establish their two-goal cushion when Perotti won a penalty from Alessandro Crescenzi before getting up to convert it.
Determined not to see their revival go to waste, Pescara pushed hard and scored again in the 74th minute, Caprari beating Szczesny with a first-time shot.
Substitute Francesco Totti, now 40, then set up Mohamed Salah with a sumptuous flick that ended up with Kevin Strootman, who could not find Roma's fourth.