Galatasaray still secured a third-place finish and a Europa League berth after last-place Lokomotiv Moscow lost 1-0 at Schalke, which had already locked up second place and a spot in the knockout rounds.
After fending off the hosts’ initial push, Porto went ahead in the 17th minute when center back Felipe got away from his marker and jumped to powerfully head home a curling free kick by Alex Telles.
Porto doubled the advantage in the 42nd after Galatasaray defender Mariano tripped Hernani as he dribbled past him inside the area. Marega drilled the spot kick in as goalkeeper Fernando Muslera dove the wrong way for the striker’s sixth goal in the Champions League this season.
The hosts were able to pull one back in first-half stoppage time when Felipe fouled Garry Rodrigues as he made a move on the left side of the box. That allowed Feghouli, the only other Galatasaray player to offer anything in attack, to step up and slot the penalty kick into the corner of Iker Casillas’ net.
Seconds after halftime, substitute Henry Onyekuru missed a clear chance to equalize from a pass by Feghouli. Instead, Porto got its third goal in the 57th. Danilo recovered the ball inside Galatasaray’s half, and sent it forward for Hernani to reach the end line before finding Sergio Oliveira to score from close range.
Galatasaray coach Fatih Terim could only grimace when Eren Derdiyok flubbed a shot from point-blank range, but Derdiyok was finally on target when he slid to tap in a cross by Rodrigues in the 65th.