The Portuguese club secured its route to the last-16 and left the host propping up Group H.
Porto secured passage to the last 16 of the UEFA Champions League with a comfortable 2-0 win at Athletic Bilbao on Wednesday.
Julen Lopetegui's men produced a fine display at San Mames and, despite missing a penalty and several other opportunities, Jackson Martinez inspired an impressive Group H triumph.
Martinez was guilty of wasting numerous chances, missing the target with two excellent opportunities in the first half before striking the bar with a spot kick three minutes before the interval.
Athletic was seemingly lifted by Martinez's penalty miss as the club started the second period with renewed determination, but the Colombian made amends in the 55th minute, netting from close range.
A Guillermo Fernandez header nearly gave the home side an equalizer as the forward's effort hit the post after 69 minutes.
The visiting side capitalized on that near miss shortly after, as Yacine Brahimi pounced on a goalkeeping error by Gorka Iraizoz to net his fourth Champions League goal of the season.
Porto's victory means the club stays top of the pool - with Shakhtar two points adrift following its win over BATE - but Athletic's miserable Champions League campaign is now officially over, as the club is rooted to the bottom with just one point from four fixtures.
The absence of Athletic's regular frontman Aritz Aduriz with a hamstring injury left a void in the attack, with Porto looking far more comfortable as the club deployed a recognized target man in the form of Martinez, who kept the home side's defense occupied from the start.
The 28-year-old should have done better in the 13th minute, though, as he pounced on Danilo's wonderful right-wing cross and poked just wide from eight yards after squeezing ahead of Aymeric Laporte.
Athletic had little luck in crafting chances for Aduriz's deputy Guillermo, with Mikel Rico having the home side's best opportunity as he headed way off target 21 minutes in.
By contrast, Martinez continued to cause havoc in the Athletic area and he went agonizingly close shortly after, heading a corner just past the post.
Porto's sustained period of dominance looked set to be rewarded just before the break as Danilo controversially earned a penalty following an apparent trip by Mikel Balenziaga.
But Martinez fired his spot kick against the crossbar as justice seemingly prevailed.
Ernesto Valverde responded to Athletic's underwhelming first-half display by introducing right back Andoni Iraola and moving Oscar de Marcos further up the field.
That tactical tweak almost bore fruit two minutes into the second half, as De Marcos turned inside the area and shot right across goal, narrowly missing the target.
Porto made the most of that letoff when it finally took a deserved lead.
The lively Brahimi surged past a couple of challenges down the left flank and, after Iraizoz failed to stop the Algerian's low delivery, Martinez was on hand to bundle home.
Guillermo almost pulled Athletic level with 21 minutes left as his looping header came back off the post - and Porto duly doubled the advantage with 17 minutes remaining.
Iraizoz let Laporte's 72nd-minute back-pass slip under his foot and Brahimi pounced, slotting into an empty net to secure the visiting side all three points and a place in the knockout phase.