(CNN) -- Germany's build-up to Euro 2012 suffered a setback Saturday with a 5-3 defeat to Switzerland in Basel.
It was the first time the Swiss, who did not qualify for this summer's tournament, had beaten Germany in an international since 1956.
German coach Joachim Loew fielded an understrength team as he rested eight Bayern Munich players who were involved in the Champions League final defeat to Chelsea last weekend.
But the performance of their understudies will do little to inspire confidence, with goalkeeper Ter Stegen having a forgettable error-strewn match as the Germans lost for the second time in a row.
Having gone through Euro qualifying unbeaten, they were beaten by France 2-1 in their last friendly in February.
Swiss striker Eren Derdiyok, who plays in the Bundesliga, scored a hat-trick and put his team 2-0 ahead with two first half goals in three minutes.
Both goals were laid on by strike partner Tranquillo Barnettas before defender Mats Hummels pulled one back for Germany just before halftime with a header from a Mesut Ozil cross.
But Derdiyok made it 3-1 after 50 minutes, again from a Barnettas assist.
Andre Schuerrle cut the lead to give Germany some hope before Andre Lichtsteiner made it 4-2 in the 67th minute. Marco Reus added the third for the Germans five minutes later but Admir Mehmedi sealed victory for the Swiss and made it 5-3 late on.
"We didn't expect a result like this and we cannot be satisfied by it," Loew told AFP.
Meanwhile, Spain warmed up for a defense of their European title with a 2-0 friendly win over Serbia in a friendly played in Switzerland.
Coach Vicente del Bosque was also forced to field a second string line-up with many of his players involved in Friday's Copa del Rey final between Barcelona and Athletic Bilbao.
Atletico Madrid's Adrian Lopez, a second half substitute, headed the 2010 World Cup winners in front in the 64th minute.
He was then pulled down by Serbia captain Branislav Ivanovic to earn a 75th minute penalty, converted by Santi Cazorla.
Spain announce their 23-man squad for Poland and the Ukraine Sunday.
Portugal, captained by Cristiano Ronaldo, were held to a disappointing 0-0 draw by Macedonia in Leiria.
Their group rivals in the Euro finals, Denmark, were beaten 3-1 by a young Brazil side, who are preparing for the London Olympics, in a friendly in Hamburg.
Porto striker Hulk scored twice with Denmark's Niki Zimling turning an Oscar cross into his own net for the other goal.
Nicklas Bendtner pulled a goal back for the well-beaten Danes.
The Netherlands also went down to a friendly defeat, losing 2-1 at home to Bulgaria.
Arsenal's Robin van Persie gave the Dutch a 45th minute lead but Bulgaria, who did not make Euro 2012, equalized four minutes into the second half with an Ivelin Popov penalty after Rafael van der Vaart had hand balled.
Bulgaria striker Ilijan Mizanski grabbed a shock winner in the second minute of injury time as the home side pushed forward and were caught on the break.