Defender Mapou Yanga-Mbiwa headed a late winner to give Roma a 2-1 victory over neighbours Lazio that guaranteed them a place in next season's Champions League group stage.
Juan Iturbe put Roma ahead in a fiery Serie A derby when he turned in Victor Ibarbo's cross from close range in the 73rd minute.
Filip Djordjevic sparked wild Lazio celebrations when he headed his side level in the 81st minute, only for Yanga-Mbiwa to nod in Miralem Pjanic's free kick.
Roma are now sure to finish second in the table. Lazio, four points behind in third, need a point at fourth-placed Napoli in their last game to qualify for the Champions League playoff round.