Barcelona showed great character to fight back from a goal down to edge out Porto and secure their place in the Champions League knockout rounds.
Pepe scored his first Champions League goal to open the scoring in the 30th minute, just moments after Mehdi Taremi had an effort chalked off for an offside infringement.
Porto's lead proved to be a brief one, as Manchester City loanee Joao Cancelo cut inside to curl an equaliser past the outstretched Diogo Costa.
After the two sides went into the break on level terms, Joao Felix landed the decisive blow before the hour mark, scoring his third European goal of the season to help his side clinch three crucial points.
As a result of the victory, Barcelona have now sealed their spot in the Champions League last 16 for the first time since the 2020-21 season, while second-placed Porto still have work to do if they are to join the Catalan giants in the knockout rounds.
© Reuters
After suffering a surprise defeat to Shakhtar Donetsk on matchday four, Barcelona came into this contest level on nine points with their Portuguese opponents.
Following an inconsistent run of form, where they won just twice in five matches (D1, L2), there was certainly pressure on Barcelona to claim all three points in this crucial Champions League encounter.
Raphinha attempted to settle any pre-match nerves in the eighth-minute, but his driven strike from distance was pushed away by the diving Costa.
Porto, who suffered a narrow 1-0 defeat in the reverse fixture, briefly thought they had taken the lead in the 27th minute when Taremi headed in at the far post only for the assistant's flag to deny him a second European goal of the season.
After failing to take heed of that warning shot, Barcelona were subsequently punished by Porto's 26-year-old winger Pepe.
Inaki Pena, deputising for the injured Marc-Andre ter Stegen, made a fine stop to deny Galeno, but he could not prevent Pepe from slotting home the rebound.
© Reuters
Fortunately for the hosts, they were behind for just two minutes before Cancelo drove inside from the left flank before bending the ball into the far corner.
With parity restored, both teams spurned chances to take a lead into the break, as Raphinha dragged his effort wide just moments before Pena made a superb stop to keep Alan Varela at bay.
Xavi's half-time words of wisdom certainly fired up Joao Felix, who rattled the woodwork within seconds of the restart.
Undeterred, Felix had a goal to celebrate in the 57th minute when he guided the ball past Costa after being teed up by Cancelo's neat cutback.
Raphinha threatened to put the game beyond doubt, but he was thwarted by Costa on three separate occasions in the final 15 minutes.
While Costa did his utmost to keep his side within arm's length, his teammates were unable to carve out an equaliser, ensuring that they finish the day level on points with Shakhtar, who will be their opponents in the sixth and final group game.
No Data Analysis info