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.
How to pose with a trophy with @esmuellert_, always the entertainer!