Bayern Munich head coach Vincent Kompany said his team's missed opportunities cost them in their 4-1 defeat away to Barcelona in the Champions League on Wednesday.

Harry Kane had equalised for Bayern after Raphinha's first-minute opener, but Robert Lewandowski scored against his former club before the Brazilian completed his hat-trick on either side of half-time.

The defeat was Bayern's second consecutive loss in Europe after being beaten 1-0 at Aston Villa last time out.

But Kompany said that this time, they had not made the most of their chances after Harry Kane had equalised in the first half. The German side controlled the game for long periods and registered 60% possession, while they had just one shot (11) fewer than Barcelona overall.

But Bayern Munich were repeatedly caught out by Barcelona's quick transition, with captain Raphinha scoring a hat trick in the rout.

"I think maybe one very, very simple analysis I can make is when you have control of a game, and you have so much possession in a place like today against a team like we played today, you have to use the opportunity to take the momentum away from the opposition team," Kompany told a press conference.

"The way it went in the start of the first half is what we thought we could achieve in this game. It was where it felt like we could edge this game. We felt like this could turn for us.

"But in key moments we got outdone and for that reason the result is fairly, fairly heavy. We played against a good team, but we have the ambition to win these games, so today we know we have to learn from this game so we are stronger going forward."

Wednesday's result leaves Kompany's side 23rd in the 36-team league with three points, while Barcelona are 10th.