Germany's Bastian Schweinsteiger scores his first penalty during a friendly on Thursday. ((John MacDougall/AFP/Getty Images))

Germany rallied with a strong second half to beat Bosnia-Herzegovina 3-1 and give itself another confidence boost ahead of the World Cup on Thursday in Frankfurt.

Edin Dzeko scored for Bosnia in the 15th minute when Philipp Lahm's attempted clearance struck the Wolfsburg striker in the chest and the ball looped over goalkeeper Manuel Neuer.

Lahm made amends by scoring the equalizer in the 50th and Bastian Schweinsteiger converted penalties in the 73rd and 77th to put Germany ahead for good in the last warm-up before the three-time champion travels to South Africa.

"We produced good performances. We created many chances but unfortunately we didn't use them all," Lahm said. "We are going to South Africa with a very good feeling."

Coming off a 3-0 win in Hungary, the Germans were given a stiff test that they mastered without too many problems. Missing five players because of injuries, Germany will send its second-youngest team to the World Cup. Only the team for the inaugural World Cup in 1934 was younger.

Germany coach Joachim Loew had Lahm, the new captain for the injured Michael Ballack, playing as right back and Holger Badstuber, the newcomer from Bayern Munich, as left back. Another surprise was Hamburg midfielder Piotr Trochowski in the starting 11.

"We still have more than a week before our opening game against Australia [June 13] and I am not thinking yet of the starting 11," Loew said.

"Despite hard training in the past two weeks we were able to step up the pace in the second half and I am pleased with that. We have a good team, we have a good spirit, we can play a good tournament in South Africa."

Klose up front

Loew used only one striker, veteran Miroslav Klose, who is travelling to his third World Cup although he spent most of the season on the bench of Bayern Munich. Klose was top scorer of the 2006 World Cup at home and has 10 goals over two tournaments.

Germany picked Bosnia as its last warmup opponent to get a taste of what it could expect from Serbia, its second Group D rival in South Africa. There was also a bit of the South African atmosphere, with many fans blowing vuvuzelas.

Bosnia allowed Germany to have more possession early in the game, then quickly moved forward once it won the ball and Lahm was forced into a last-minute clearance to deny Dzeko.

Germany struck back in the ninth minute when Lukas Podolski shook the crossbar with a powerful shot from the edge of the penalty area.

Dzeko's goal left Germany struggling to find rhythm although Mesut Oezil broke free on the right, only to delay his shot long enough for Bosnia's defence to regroup. Sami Khedira then prodded the ball wide of an empty net.

Both Klose and Trochowski were substituted after disappointing performances in the first half. Klose, who had only three goals in the Bundesliga last season, was replaced by Cacau, who had 13 for Stuttgart. Thomas Mueller, coming off a remarkable first season with Bayern, came in for Trochowski.

Cacau made his presence felt immediately, winning the ball and feeding Lahm before the equalizer, then releasing Oezil, whose shot struck the crossbar.

Penalty claims

The Stuttgart striker was furious with Italian referee Nicola Rizzoli for ignoring what appeared to be his justified calls for a penalty in the 55th

"We showed a lot of character in the second half. I am working hard to be the starting forward," Cacau said.

Oezil came close again in the 69th, but Bosnia goalkeeper Kenan Hasagic stopped the shot.

Lukas Podolski came off in the 71st to make way for Marko Marin, who was born in Bosnia, and Marin earned a penalty two minutes later when he was brought down by Sanel Jahic. Marin is one of several foreign-born players in the German team -- Cacau was born in Brazil, while Podolski, Klose and Trochowski were all born in Poland.

Podolski had an ice pack taped to his left thigh after leaving the game.

Mueller was downed by Emir Spahic for the second penalty converted again by Schweinsteiger.

Spahic later tangled with Marin, who was booed by Bosnian supporters every time he touched the ball, and the Bosnia defender received a yellow card for pushing his hand into Marin's face.

"We played well, at least in some stages and should have scored a couple of more goals," Schweinsteiger said.


Germany: Manuel Neuer; Philipp Lahm, Arne Friedrich (Serdar Tasci, 86), Per Mertesacker, Holger Badstuber, Sami Khedira, Bastian Schweinsteiger (Toni Kroos, 86), Piotr Trochowski (Thomas Mueller, 45), Mesut Oezil (Mario Gomez, 80), Lukas Podolski (Marko Marin, 71), Miroslav Klose (Cacau, 45).

Bosnia-Herzegovina: Kenan Hasagic; Sanel Jahic, Emir Spahic, Adnan Mravac (Senijad Ibricic, 44), Safet Nadarevic, Sejad Salihovic (Dzemal Berberovic, 78), Elvir Rahimic, Miralem Pjanic, Zvjezdan Misimovic (Zlatan Mislimovic, 80), Vedad Ibisevic (Ermin Zec, 74), Edin Dzeko.