Porto and Roma played out a 1-1 draw in the final qualifying round of the Champions League to set up a tense second meeting on Aug. 23.
Roma went in front in the 36th minute when Porto defender Felipe inadvertently diverted the ball into his own net.
But the Italian side were reduced to 10 men before the break when Thomas Vermaelen, on loan from Barcelona, was given a straight red card for a high foot.
Porto made their numerical advantage pay when Andres Silva struck home from the penalty spot after a handball by Emerson.
Monaco clinched a 2-1 away win at Villarreal to give them the edge ahead of their rematch in France next week.
Ligue 1 side Monaco took a third-minute lead with Fabinho keeping his cool from the penalty spot after Thomas Lemar was brought down in the box by Alfred N'Diaye.
Villarreal hit back through former Chelsea forward Alexandre Pato, who nodded in from close range after Monaco failed to clear.
Monaco restored their lead on 72 minutes when Bernardo Silva powered a left-footed shot home after a surging run, before Benjamin Mendy received a late red card.
Irish minnows Dundalk's Champions League dream looks set to come to an end after they suffered a 2-0 loss to Polish outfit Legia Warsaw.
Nemanja Nikolic opened the scoring for Legia Warsaw, thumping in from the penalty spot after a foul by Andrew Boyle, before Aleksandar Prijovic scored deep in injury time.
Ludogorets Razgrad are in a comfortable position to reach the group stage after a 2-0 win at home over Czech side Viktoria Plzen.
Cosmin Moti broke the deadlock with a penalty before Jonathan Cafu doubled their advantage on 64 minutes.