Match ends, Roma 1, Milan 2.
AC Milan moved four points behind Serie A leaders Inter Milan by beating Roma.
Franck Kessie put Milan ahead from the penalty spot after Roma's Federico Fazio fouled Davide Calabria.
But Roma's Jordan Veretout equalised with a fine finish from 18 yards out after five minutes of the second half.
However, after striker Zlatan Ibrahimovic went off to protect a groin injury, Milan scored the winner through Ante Rebic's shot on the turn following Alexis Saelemaekers' pass.
Milan will play Manchester United in the Europa League last 16 over two legs on 11 and 18 March in matches that would see Ibrahimovic, who spent a season and a half at Old Trafford, potentially feature against his former side.
The Swedish striker appeared to suffer a groin injury midway through the first half, but was still able to play until the 58th minute and was heavily involved.
Ibrahimovic, 39, has scored 14 Serie A goals this season and had numerous chances to add to that total but had a strike tipped over, another effort cleared off the line, a goal disallowed, he backheeled a chance wide and also headed over.
Milan's Simon Kjaer headed against the crossbar and Rebic and Saelemaekers had shots saved as the visitors dominated, before Kessie converted a penalty.
The referee had originally not given a spot-kick, but changed his mind after watching the incident on a pitchside monitor following a video assistant referee check.
Roma's ex-Manchester United and Arsenal midfielder Henrikh Mkhitaryan had a goal disallowed and shot wide with only goalkeeper Gianluigi Donnarumma to beat before Veretout made it 1-1, but Milan regained the lead again eight minutes later.
Second-placed Milan had failed to win in their past four games in all competitions and are aiming for their first league title since 2010-11.
Earlier on Sunday, Inter won 3-0 at home to Genoa with goals from former Manchester United trio Romelu Lukaku, Matteo Darmian and Alexis Sanchez.
- 20FazioBooked at 41minsSubstituted forda Silva Peresat 62'minutes
- 17VeretoutSubstituted forDiawaraat 79'minutes
- 14VillarSubstituted forEl Shaarawyat 70'minutes
- 7PellegriniBooked at 89mins
- 77MkhitaryanBooked at 80mins
- 21MayoralSubstituted forPedroat 79'minutes
- 5Nunes Jesus
- 33da Silva Peres
- 87Cerantola Fuzato
- 92El Shaarawy
- 99G Donnarumma
- 2CalabriaBooked at 85mins
- 8TonaliSubstituted forMeitéat 83'minutes
- 56SaelemaekersBooked at 46minsSubstituted forCastillejo Azuagaat 83'minutesBooked at 90mins
- 10CalhanogluSubstituted forDíazat 45'minutes
- 12RebicSubstituted forKrunicat 67'minutes
- 11IbrahimovicSubstituted forda Conceição Leãoat 56'minutes
- 7Castillejo Azuaga
- 17da Conceição Leão
- 90A Donnarumma
- Marco Guida
- Shots on Target
Second Half ends, Roma 1, Milan 2.
Foul by Henrikh Mkhitaryan (Roma).
Franck Kessié (Milan) wins a free kick in the defensive half.
Samu Castillejo (Milan) is shown the yellow card for a bad foul.
Rick Karsdorp (Roma) wins a free kick in the defensive half.
Foul by Samu Castillejo (Milan).
Attempt saved. Henrikh Mkhitaryan (Roma) left footed shot from the centre of the box is saved in the top centre of the goal.
Attempt missed. Pedro (Roma) left footed shot from the centre of the box misses to the right. Assisted by Stephan El Shaarawy.
Lorenzo Pellegrini (Roma) wins a free kick in the defensive half.
Foul by Simon Kjaer (Milan).
Lorenzo Pellegrini (Roma) is shown the yellow card.
Foul by Gianluca Mancini (Roma).
Rafael Leão (Milan) wins a free kick in the defensive half.
Stephan El Shaarawy (Roma) wins a free kick in the attacking half.
Foul by Samu Castillejo (Milan).
Davide Calabria (Milan) is shown the yellow card for a bad foul.
Leonardo Spinazzola (Roma) wins a free kick on the left wing.
Foul by Davide Calabria (Milan).
Substitution, Milan. Soualiho Meité replaces Sandro Tonali.
- Sounds of the Nineties: Weezer, Green Day and more on the ultimate pop-rock mixtape
- Nintendo Nostalgia and games for phones: Press X to Continue hosts Tom Grennan