
Lopez opened the scoring for the visitors in the 18th minute with a tap-in from a low cross from Raphinha, who then made it 2-0, collecting a fine long ball from young debutant Hector Fort in the 51st minute.
Despite Barcelona looking dominant, Adria de Mesa lifted the spirits of the home crowd when he capitalised on a loose ball in the box to pull one back for Barbastro in the 60th minute.
Barbastro went close to equalising, before substitute Lewandowski made no mistake from the penalty spot to extend Barca’s lead with two minutes to go.
Barbastro’s Marc Prat made it 3-2 in stoppage time also with a penalty, but the hosts could not prevent Xavi Hernandez’s side sealing the win.