Updated

LONDON (AP) — Helped by Bastian Schweinsteiger's two penalty kicks, Germany came from behind to beat Bosnia-Herzegovina 3-1 on Thursday while Mexico defeated Italy 2-1 and Spain needed an 85th minute winner to edge South Korea 1-0 in World Cup warmup games, eight days before the tournament starts.

Wolfsburg striker Edin Dzeko threatened an upset in Frankfurt with a 15th-minute strike for non-qualifier Bosnia, which led at halftime.

But Philip Lahm equalized in the 51st and Schweinsteiger fired home penalties in the 73rd and 78th to give the three-time champion Germans a boost ahead of their first Group D game against Australia in Durban on June 13. They go on to face Serbia and Ghana in one of the toughest groups.

Carlos Vela gave the Mexicans a 16th-minute lead and Alberto Medina added a second in the 81st as Italy's slow defense was exposed in Brussels, although Leonardo Bonucci replied for the defending World Cup champions.

The performance was a blow for Marcello Lippi's team ahead of the first game in its title defense, against Paraguay in Cape Town. Italy then meets New Zealand and Slovakia.

The Mexicans face host South Africa in the opening game next Friday and then meet former champions France and Uruguay.

Spain's winner was a 25-yard shot and a first in national colors for midfielder Jesus Navas as coach Vicente Del Bosque fielded many of his backup players in the Austrian city of Innsbruck.

Cesc Fabregas made his first appearance since cracking a bone in his leg playing for Arsenal against Barcelona in the Champions League in April and played the first hour without making any major impact.

The two teams used the venue and nearby training camp to get used to playing at high altitude, where many of their games will be in South Africa.

Spain's first game at the World Cup, however, will be at sea level at Durban against Switzerland before the European champions move to higher ground to take on Honduras at Johannesburg's Ellis Park and Chile in nearby Pretoria.

The South Koreans start off against Greece at Port Elizabeth but then take on Argentina at Johannesburg's Soccer City and its third group game is against Nigeria at Durban.

In Friday's warmup games, France takes on China at the Reunion Island in the Indian Ocean, Slovenia hosts New Zealand in Maribor and Japan plays the Ivory Coast at Sion in Switzerland.