Germany captain Manuel Neuer's comeback ended in defeat by Austria in a friendly delayed by 105 minutes because of heavy rain in Klagenfurt.
Goalkeeper Neuer, out since September with a broken foot, returned just 15 days before his country's World Cup defence begins against Mexico.
Mesut Ozil pounced on a goalkeeping error to give Germany the lead.
But Martin Hinteregger equalised with a superb angled volley before Alessandro Schopf steered in the winner.
It ensured Austria their first win over Germany in 32 years and maintained Franco Foda's 100% record since becoming their coach last November.
Germany head coach Joachim Low rested Bayern Munich pair Thomas Muller and Mats Hummels, along with Real Madrid midfielder Toni Kroos, in order to give them time to recover at the end of a demanding club season.
It looked for a while as if the rest of Low's squad would be given the night off too as a downpour put the game in doubt.
Czech referee Pavel Kralovec carried out a number of pitch inspections - with the kick-off put back three times - before finally deciding that play could start.
Low took the chance to check on the depth of his squad, with Freiburg striker Nils Petersen making his international debut at the age of 29, but doing little to strengthen his claims to displace Timo Werner from the starting line-up in Russia.
Germany rather lost their way after a strong start, with Bayern full-back Joshua Kimmich looking very uncertain as he played several loose passes out of defence.
Ozil showed his capacity to amaze and frustrate - his well-taken early goal was steered in after he was presented with the ball by goalkeeper Jorg Siebenhandl's awful clearance.
But the Arsenal forward's influence faded after the opening 20 minutes, with one weak second-half free-kick, straight into the Austria wall, a particularly sloppy contribution, and he was taken off in the closing stages.
Austria - who failed to qualify for the World Cup after finishing behind Serbia, the Republic of Ireland and Wales in their group - recovered well from a sluggish start, and were rewarded for taking the game to their opponents.
Bayern Munich's David Alaba, playing in a left-sided attacking role, was instrumental in their comeback, playing incisive passes and taking the corner from which Hinteregger somehow volleyed past Neuer from the tightest of angles.
Germany coach Low said: "I am not upset about the loss, not upset about losing the game, I am upset about the way we lost it.
"It was our own fault, because after taking the lead we controlled the game, but right before the break and the first 15 to 20 minutes after the break we weren't in the game at all. We lost the ball unbelievably often, there were so many turnovers.
"We are not used to that from our team. We let the Austrians get back in the game."
Neuer was arguably the player of the tournament at the last World Cup, even though he lost out to Argentina playmaker Lionel Messi in the official vote, and his return from injury has come at a good time for Germany.
He looked a little rusty at first, with one scuffed clearance presenting Schopf with a chance that the goalkeeper recovered to gather.
As the game went on, Neuer rediscovered his rhythm, re-adjusting his feet well to save Florian Grillitsch's shot towards the near post in the first half, and diving bravely to block Marko Arnautovic after Alaba's sublime pass had played the West Ham forward clear.
Neuer could not be blamed for either Austria goal - Hinteregger's volley was brilliantly taken, while Schopf's winner was steered coolly into the corner of the net after Stefan Lainer cushioned Julian Baumgartlinger's far-post cross into the midfielder's path.
The goalkeeper will have one more chance to get some pre-World Cup minutes under his belt when Germany face Saudi Arabia in a friendly in Leverkusen on Friday when Low will want a much better performance from his side.