Bayern Munich scored twice in four minutes against the run of play, through Lucas Hernandez and Leroy Sane, to beat Barcelona 2-0 in its Champions League Group C match on Tuesday.
It was an unhappy return to Munich for Barca striker Robert Lewandowski, the Bavarians' second-highest all-time scorer who left in the summer after eight years, with the Germans now top of their group on six points from two matches.
Barcelona is on three points, along with Inter. Viktoria Plzen is in last place.
Xavi's Barca enjoyed a dream start, boxing the Germans in their own half with relentless pressing and carving out several early scoring chances.
Pedri's shot was blocked by keeper Manuel Neuer before Lewandowski fired a volley over the bar in the 17th minute.
The Pole, who scored 344 goals for Bayern in 375 games, came close again four minutes later, heading on to Neuer from close range.
The visitor did not give Bayern a look-in during the first half, with a hard-working Barca backline double-teaming every Bayern player when it had possession, nipping any planned move in the bud.
It was a different story after the break, with Bayern bringing on Leon Goretzka and scoring against the run of play with Hernandez beating keeper Marc-Andre Ter Stegen at the near post from a Joshua Kimmich corner.
Bayern doubled its lead four minutes later when Sane charged into the box and slipped the ball past Ter Stegen after combining with Jamal Musiala.
Pedri hit the post in the 63rd as Barca tried to bounce back but the Germans comfortably held on to get the three points and offer coach Julian Nagelsmann some relief following three consecutive draws in the Bundesliga that saw them drop to third place.
It hosts Czech side Plzen in the Champions League on October 4.
Dzeko guides Inter to 2-0 Champions League win over Viktoria Plzen
Inter Milan's Edin Dzeko scored one and created another as it cruised to a 2-0 victory at Viktoria Plzen in Champions League Group C on Tuesday.
Inter controlled the match from the start and opened the scoring in the 20th minute when Joaquin Correa picked out an unmarked Dzeko whose right-footed shot in the penalty area beat Plzen keeper Jindrich Stanek.
The Czech champion spent most of the game defending and faced an uphill battle after Pavel Bucha was sent off in the 61st minute for a dangerous tackle that caught Inter midfielder Nicolo Barella on the shin.
The visitor doubled its lead 10 minutes later on the counter attack when Dzeko turned provider with a clinical pass that allowed Denzel Dumfries to slot home.
Plzen brought on attacking players after it went down to 10 men but never really threatened and finished the match with only one shot on target to Inter's seven, with the visitor controlling nearly 70 percent of possession.
Inter coach Simone Inzaghi said with three matches in six days, he needed to rotate his squad against a Plzen side that played physical football throughout the match.
"We are happy, because we knew we couldn't underestimate our opponents and we didn't," Inzaghi said.
"The boys were good. They remained focused and I congratulated them in the changing room after the final whistle."
After losing 2-0 to Bayern Munich in their opening match, Inter moved to three points, while Plzen remain pointless after its opening two games.