Pre-season friendly: 1860 Munich 2-3 Cardiff City
Slovenian striker Etien Velikonja's late goal gave Cardiff a win over 1860 Munich in sweltering conditions in Kirchbichl, Austria.
City twice took the lead through Federico Macheda's clinical finish and a Peter Whittingham free-kick.
The German second division club equalised through Christian Schindler's header and Maximilian Wittek's deflected shot.
It was the first of two matches in one day for Cardiff.
A team made up of other players in the squad will now face Albanian side KS Teuta Durres.
Cardiff are three days into their pre-season training camp in Austria and 1860 Munich have just begun their preparations.
With temperatures hitting 35 degrees Celsius and the conditions were extremely testing for both sides.
Despite the heat and regular water breaks there was plenty of energy on display, particularly in the first half.
Former Manchester United striker Macheda slotted home on 23 minutes following Norwegian Mats Moeller Daehli's run and cross.
Schindler's header brought the German side level just five minutes later. But Whittingham struck home a free-kick from a narrow angle to deceive Munich's former Crystal Palace goalkeeper Gabor Kiraly on 30 minutes.
Cardiff failed to hold onto the lead and seven minutes before the break, Wittek's long range effort deflected into the bottom corner of the goal.
Munich had their chances and had three efforts disallowed for offside during the match.
Substitute Velikonja, for so long a peripheral figure at Cardiff, scored the winner after a swift break from fellow replacement Kim Bo Kyung and Magnus Eikrem, who was playing at right back.
South Korean international Kim, who played at the World Cup in Brazil, missed a great chance in injury time to score a fourth.