Lionel Messi once again proved PSV Eindhoven’s nemesis as Barcelona secured top spot in Group B of the Champions League with a 2-1 victory at the Philips Stadion.

Messi bagged a hat-trick when the two sides met at the Nou Camp in September and he took his tally against the Dutch champions to four goals in two games with a fine solo effort just after the hour mark.

He then provided a clever assist for Gerard Pique to double the visitors’ lead shortly afterwards and Barca held on despite Luuk De Jong setting up a nervy finale.

Barca therefore guaranteed they cannot be caught by either Inter Milan or Tottenham, who they welcome to the Nou Camp in two weeks’ time for their final group fixture.

PSV, meanwhile, were left cursing their wastefulness in front of goal as their hopes of finishing third in the group evaporated following the defeat.

Gaston Pereiro, De Jong and Denzel Dumfries were all denied by the frame of the goal in the opening 45 minutes before Barca, led by Messi, upped their intensity after the break.

Barcelona, who had won only one of their previous six away matches in the Champions League, made four changes to the line-up that drew against Atletico Madrid on Saturday, with Philippe Coutinho and Ivan Rakitic among those recalled.

But they were on the back foot almost from the off as goalkeeper Marc-Andre ter Stegen was forced into action, saving well from Pereiro’s free-kick and De Jong’s effort through a crowded area from the resulting corner.

Barca’s sluggish start continued and they were given a let-off after Rakitic was dispossessed by Pereiro, who rifled a shot off a post from just outside the area.

Hirving Lozano miscued when well placed while Pereiro fired over from point-blank range after effortlessly shrugging off the challenge of Pique.

The visitors were showing signs of warming to their task by this stage, though, and Arturo Vidal was twice denied by clearances off the line in quick succession.

Messi was having more of an impact as the first half wore on and the Argentinian forced PSV goalkeeper Jeroen Zoet into a trio of saves.

But PSV served notice of their intent just before the interval, with De Jong heading against the crossbar from Pereiro’s free-kick before Dumfries saw his rebound come back off a post.

Messi made his presence felt at the beginning of the second half as his low effort was palmed away by Zoet before PSV scrambled clear.

There was no denying Barca’s talisman in the 61st minute, though, Messi exchanging passes with Ousmane Dembele before jinking his way past several defenders and prodding low beyond Zoet.

Rakitic blasted over in the area but Barca would not have long to wait to double their lead, Messi turning provider this time as his free-kick was instinctively diverted into the net by Pique in the 70th minute.

Steven Bergwijn, Lozano and De Jong all went close as PSV refused to throw in the towel before the latter gave them a lifeline with seven minutes remaining, rising highest to head home Jose Angelino’s cross.

It was the least PSV deserved and it could have been even better, although a strong penalty appeal was waved away after Dumfries had gone down from Clement Lenglet’s challenge.