The Barcelona playmaker scored twice in the final five minutes to secure victory after Xherdan Shaqiri had cancelled out his 19th-minute opener.
Olivier Giroud scored his first international goal as France beat fellow Euro 2012 finalists Germany 2-1 in Bremen.
The Montpellier striker, the leading scorer in Ligue 1 this season, netted after 21 minutes and veteran Florent Malouda (69) added a second to ensure Cacau's 90th-minute effort was a consolation for the hosts.
Arjen Robben netted an injury-time winner as Holland won 3-2 against England at Wembley.
Robben (57) opened the scoring before Klaas Jan Huntelaar added a second a minute later, albeit suffering a sickening clash of heads with Chris Smalling in the process.
England battled back through late goals from Gary Cahill and Ashley Young, but Robben won it with a curling shot in injury time.
Uruguay equalled their longest ever unbeaten run of 14 games as they drew 1-1 in Romania. Edinson Cavani's third-minute opener was cancelled out by Bogdan Stancu (49).
Roberto Soldado pushed his Euro 2012 claims with a hat-trick in Spain's 5-0 win over 10-man Venezuela.
In the absence of regular strikers David Villa and Fernando Torres the Valencia man shone, and could even afford to miss a 66th-minute penalty.
Andres Iniesta and David Silva had already fired Spain 2-0 ahead before Soldado took over in the second half. Venezuela had Fernando Amorebieta sent off before Soldado missed his spot kick.
Italy suffered a surprise 1-0 defeat to the United States in Genoa with Clint Dempsey netting the winner on 55 minutes.
Ukraine won 3-2 win over Israel in Tel Aviv while fellow Euro 2012 co-hosts Poland drew 0-0 with Portugal.
Oleg Gusev (16 pen) and Yevhen Konoplyanka (44) gave Ukraine 2-0 lead which they needed as the hosts pushed them after the break.
Tomer Heman (56 pen) pulled a goal back and while Andriy Yarmolenko (60) made it 3-1 Ben Sahar (62) immediately responded to leave Ukraine to hang on.
New Turkey boss Abdullah Avci's first game in charge ended in a 2-1 defeat by Slovakia in Bursa.
Substitute Sebastian Larsson scored twice as Sweden beat Croatia 3-1. Zlatan Ibrahimovic (13 pen) opened the scoring before a Jonas Olsson own goal (44) levelled matters.
The Republic of Ireland drew 1-1 with Czech Republic in Dublin while Andrey Arshavin celebrated his return to Russia by scoring in their 2-0 win over Denmark.
Wales were unable to celebrate a win on a night dedicated to their late former boss Gary Speed, who died last year. The hosts were beaten 1-0 by Costa Rica on an emotional night in Cardiff.
Norway beat Northern Ireland 3-0 in Belfast, Greece were held to a 1-1 draw by 10-man Belgium and Austria were easy 3-1 winners at home to Finland.
World number 133 Luxembourg upset Macedonia 2-1, Malta beat fellow minnows Liechtenstein by the same scoreline while Stevan Jovetic's second-half brace gave Montenegro a 2-1 win over Iceland.
Armenia thrashed Canada 3-1, Georgia were 2-1 winners at home to Albania. There were 1-1 draws between Bulgaria-Hungary and Slovenia-Scotland.
Serbia's trip to Cyprus ended 0-0 while Moldova-Belarus and Latvia-Kazakhstan were also goalless.
In Africa, Morocco beat Burkina Faso 2-0, South Africa and Senegal was goalless while Tunisia drew 1-1 with South Americans Peru.
Colombia claimed an impressive 2-0 win in Mexico.
Radamel Falcao opened the scoring after 36 minutes and Juan Cuadrado netted just before the hour mark.
Matias Fernandez's penalty 15 minutes from the end salvaged a 1-1 draw for 10-man Chile against Ghana.
Richard Mpong had opened the scoring for Ghana three minutes before the break and Matias Campos was dismissed for a deliberate handball after 70 minutes.
Jonathan Santana scored two minutes from time as Paraguay, who had Victor Caceres send off for deliberate handball after 15 minutes, beat Panama 1-0.
Jaime Ayovi scored twice as Ecuador beat Honduras 2-0 and Bolivia were 1-0 winners against Cuba.
Finally, Ragnar Klavan and Raio Piiroja scored the goals as Estonia won 2-0 in El Salvador.
Wednesday's International Friendly Results
Romania 1-1 Uruguay
Israel 2-3 Ukraine
Poland 0-0 Portugal
Turkey 1-2 Slovakia
Croatia 1-3 Sweden
Denmark 0-2 Russia
Greece 1-1 Belgium
Austria 3-1 Finland
Luxembourg 2-1 Macedonia
Malta 2-1 Liechtenstein
Montenegro 2-1 Iceland
Armenia 3-1 Canada
Georgia 2-1 Albania
Bulgaria 1-1 Hungary
Cyprus 0-0 Serbia
Moldova 0-0 Belarus
Latvia 0-0 Kazakhstan
Morocco 2-0 Burkina Faso
South Africa 0-0 Senegal
Tunisia 1-1 Peru
Mexico 0-2 Colombia
Chile 1-1 Ghana
Paraguay 1-0 Panama
Ecuador 2-0 Honduras
Bolivia 1-0 Cuba
El Salvador 0-2 Estonia