Robert Lewandowski scored two minutes from time as Bayern Munich won the Audi Cup courtesy of a 1-0 victory over Real Madrid at the Allianz Arena on Wednesday.
The Bundesliga champions outclassed Milan on Tuesday but were made to work harder for their win against an under-strength Real, who started without Gareth Bale or James Rodriguez.
Bale and Rodriguez scored for Rafael Benitez's side in the victory over Tottenham a day earlier and, in the absence of that duo and the injured Cristiano Ronaldo and Karim Benzema, the likes of Jese Rodriguez, Lucas Vazquez and Denis Cheryshev struggled to muster much attacking threat.
Thomas Muller's deflected effort was Bayern's best chance of the first half while substitute Lewandowski missed a sitter early in the second.
But just when the final of the final of the pre-season competition was set to go to penalties, Lewandowski showed his poaching instincts to turn home Douglas Costa's wonderful cross and see Bayern into Sunday's DFB-Pokal meeting with Nottingen off the back of a win.
Real complete their pre-season at Valerenga on Sunday.
After Real's Toni Kroos fired wide against his former club, David Alaba unleashed a powerful effort at goal for the hosts - Philipp Lahm heading the rebound wide after Keylor Navas' save 13 minutes in.
It proved the main event of a low-key opening half-hour as Real's much-changed XI kept Bayern at bay - a poor final ball from Vazquez cutting short a potential break from the visitors.
Sergio Ramos almost deflected Muller's wayward strike in prior to the break - the Bayern man finding the post - before Navas saved from Mario Gotze following clever play down the left from Costa.
Kroos had the first effort of the second half, forcing Manuel Neuer into a smart save with a free-kick, before Lewandowski spurned a golden opportunity to open the scoring.
Having registered with a stunner against Milan, the Polish striker inexplicably turned the ball wide from close range shortly after the hour mark.
As Bayern cranked up the pressure, Pierre Hojbjerg brought an impressive save out of Navas before Lewandowski made amends for his miss.
The former Borussia Dortmund man prodded home Costa's inch-perfect delivery after losing his marker as Bayern eventually sealed the win and the Audi Cup.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.