Paulo Dybala's double strike propelled AS Roma into the Europa League's last-16, while Ajax advanced in extra time despite playing with 10 men for 95 minutes.
Porto, who drew 1-1 in the first leg at home, took the lead through Spanish attacker Samu Aghehowa, but Dybala's quick brace swung the momentum towards last year's finalists.