The Giallorossi stormed into a two-goal lead in the first half but a Rodrigo Palacio strike ensured that the Milan outfit still has every chance of reaching the finalRoma holds a slight advantage in its Coppa Italia semifinal with Inter as it emerged a 2-1 winner in the first leg at Stadio Olimpico.
The Giallorossi exploited glaring holes in the visitors' three-man defense to race into a two-goal lead with a pair of headers from Alessandro Florenzi and Mattia Destro, respectively. The Nerazzurri pulled one back through Rodrigo Palacio at the close of the first half and despite an improved display after the break they were unable to find another.
Roma looked keen to make the most of their home advantage as they attacked eagerly during the early exchanges. Destro saw the first effort of the game saved comfortably, but in the 13th minute, Zdenek Zeman's side took the lead.
The adventurous Ivan Piris flighted in a pinpoint delivery from the right and Florenzi made the most of some slack marking to nod the ball past Samir Handanovic and into the top corner.
The Nerazzurri responded well and caught Roma off guard with a counter-attack moments later, but Fredy Guarin's shot crashed off the outside of the post.
Almost instantly the hosts were down the other end and should well have doubled their advantage. After a brilliant dummy from Destro, Totti failed to take the ball round Handanovic and Erik Lamela's follow-up was cleared off the line by Andrea Ranocchia.
But the center back's heroics were soon forgotten as he was largely culpable for Roma's second goal. Ranocchia did not get tight enough to Destro and the striker capitalized, heading in from Piris' cross at the near post after 33 minutes.
Inter was continually being exposed down the left and it nearly proved the source of yet another goal as Handanovic parried a cross onto his own post before Guarin cleared away.
To their credit Andrea Stramaccioni's men kept their heads up and after Guarin had been denied by a brilliant Maarten Stekelenburg save, Palacio poked home following a quality delivery from Esteban Cambiasso to halve the deficit in the 44th minute.
Stramaccioni replaced Joel Obi with Yuta Nagatomo for the second half, switching to a four-man defense, and it gave his team a more solid base from which to attack.
Guarin was still the spearhead of everything positive the visitors created as he supplied numerous piercing passes as well as pulverizing, albeit off-target, shots at goal.
Roma was far from the attacking force it had been in the first half and nearly gifted Inter an equalizer in the 68th minute. Piris failed to deal with a cross into the area and after seeing his initial effort blocked by Leandro Castan, Palacio's second effort was held by Stekelenburg.
Ricardo Alvarez was introduced 15 minutes from time and he nearly had the perfect impact as he seized upon some poor control by Federico Balzaretti, but his curled effort flew agonizingly wide of the goal.
But the Giallorossi managed to hold on until the final whistle, though an away goal for the Milan side means the tie will still be very much in the balance when the pair meet at San Siro for the second leg.