MUNICH — For once, Barcelona was on the wrong end of the kind of rout it so often inflicts on others.

And with Bayern Munich in such devastating form, even a fully fit Lionel Messi might not have made much difference.

Thomas Mueller scored twice, Mario Gomez and Arjen Robben had one goal each and Bayern Munich routed Barcelona 4-0 Tuesday night in the first leg of their Champions League semifinal. Bayern humbled the Spanish powerhouse by taking full advantage of Messi’s subpar performance.

“We knew we were able to give them a good competition,” winger Arjen Robben said. “This team (Barcelona) has dominated Europe over the last five years and if you beat them like this, I think you can be proud.”

In a game perhaps signaling a shift in power, Bayern Munich sent Barcelona to its first four-goal defeat since a 4-0 loss at Getafe in the Copa del Rey semifinals on May 10, 2007. Barcelona, which has won three of the last seven titles, had lost by four goals only once before in the Champions League, 4-0 at Dynamo Kiev in the group stage on Nov. 6, 1997.

“We can be proud, we played a terrific game, everybody,” Robben said. “We fought for every meter and we didn’t give them much space to play.”

Mueller scored on a close-range header in the 25th minute after Franck Ribery’s corner kick went to the far post, where Robben crossed to Dante for a header back across the goal.

Gomez doubled the lead in the 49th against a defense missing injured center backs Carles Puyol and Javier Mascherano. Ribery’s corner kick went to the far post, where Mueller rose over Daniel Alves and headed across for Gomez, who may have been offside.

Robben made it 3-0 in the 73rd when he worked around a pick by Mueller and slotted an angled shot past goalkeeper Victor Valdes. Mueller got his second goal in the 82nd off a pass swung in by David Alaba.

“When it comes to big games, I just go wild,” Mueller said.

Barca is in a hole it might have no chance of climbing from.

“Wonders are difficult to achieve, 4-0 is an enormous result. We want to play with pride and we’ll try (our) best,” assistant coach Jordi Roura said.

Barcelona left back Jordi Alba received a yellow card in the 89th minute and is suspended for the second leg of the total-goals series on May 1 in Barcelona.

Borussia Dortmund hosts Real Madrid on Wednesday in the start of the other semifinal.

Four-time world player of the year Messi, slowed by a hamstring injury, made his first start since April 2, but wasn’t a factor. Barcelona had few chances, while Bayern used its size to outmuscle the Spanish team on restarts.

Messi has been bothered by the hamstring injury for three weeks and was only declared fit to play shortly before the match. But the four-time FIFA player of the year was a pale shadow of himself.

“Leo tried really hard just to be here, he gave everything, but he couldn’t do more,” Roura said.

With Messi struggling, none of his teammates was able to create much.

“You have to have a plan against Barcelona and the players executed it very well,” said Bayern coach Jupp Heynckes, who will be replaced by former Barcelona counterpart Pep Guardiola after this season. “Barcelona has a certain philosophy, but my players knew exactly what they had to do on the field. We defended as a team, we really wanted not to concede a goal at home and we achieved that. At the same time, we were creative in attack, and if we gain space, we can beat any team in the world. But Barcelona is still one of the best teams and there are still 90 minutes to play. We haven’t qualified yet.”