Barcelona were pushed all the way by PSV Eindhoven ahead of winning 2-1 in Holland tonight.
The Spanish side had already qualified for the Champions League last 16 but sealed top spot with a Lionel Messi strike and Gerard Pique's clever second.
Pique stabbed into the bottom corner in what looked like a planned move from Messi's swept delivery, after the Argentine fired home through a crowd.
The Dutch side hit the frame of Barca's goal four times before finally finding the net, with the five-time European champions repeatedly exposed at the back.
It led to a nervy end to the match for Barca, and Denzel Dumfries had a strong injury-time penalty shout turned down after Clement Lenglet appeared to catch him in the box with a clumsy challenge.