ROME — Roma fans were back in the Stadio Olimpico on Tuesday to see their team beat city rival Lazio but lose the Italian Cup semifinal 4-3 on aggregate.

Mohamed Salah scored twice and Stephan El Shaarawy netted the other as Roma won the second leg of their semifinal derby 3-2.

But goals from Sergej Milinkovic-Savic and Ciro Immobile sent Lazio through to the final, where it will likely meet Juventus. The Serie A leader visits Napoli on Wednesday, leading 3-1 from the first leg and firmly on course for a third successive league and cup double.

"We can say it's a sweet defeat," Lazio captain Senad Lulic said. "We deserved this final. The team played well, so we'll enjoy this night and we'll wait until tomorrow to see who we'll meet in the final."

Roma dominated the match and had 25 shots. It also made 42 crosses to Lazio's six.

"It's a defeat that upsets us," Roma coach Luciano Spalletti said. "We can't change the past, and now we have to be careful for the future.

"We did well in general, but when you come from a 2-0 defeat in the first leg you have to be careful about what happens. And we let too many things through."

Trailing 2-0 from the first leg, Roma knew it faced an uphill struggle. But its fans packed the stadium in their droves, ending a 14-month protest after deeply unpopular security barriers were removed last week.

Roma attacked from the start and could have taken the lead in the third minute but Edin Dzeko volleyed wide of the left upright.

Roma dominated as Lazio was content to sit back on its advantage and attack on the counter.

And the visitors took the lead with their first attempt on goal in the 37th. Roma 'keeper Alisson did well to parry Immobile's effort but Milinkovic-Savic was on hand to tap in the rebound.

Roma levelled two minutes from halftime when Lazio defender Stefan de Vrij deflected Antonio Rudiger's cross into the path of El Shaarawy, who volleyed into the bottom left corner.

Milinkovic-Savic and Immobile had scored in the first leg and so it proved again as they linked up for the Italy forward to restore Lazio's lead in the 56th.

Desperately needing goals, Roma had left gaping holes in defence and a long ball from Milinkovic-Savic allowed Immobile to sprint forward alone and slot it past the onrushing Alisson.

Roma was not going to go down without a fight and levelled again 10 minutes later. El Shaarawy's effort came off the right post but Salah fired in the rebound.

Salah doubled his tally in the final minute with another follow-up as Lazio goalkeeper Thomas Strakosha couldn't hold Radja Nainggolan's effort.