Portugal's players celebrate after Raul Meireles, unseen, scored the opening goal against Bosnia-Herzegovina on Wednesday. ((Armando Franca/Associated Press))

Portugal qualified for the World Cup for the third time in a row, beating Bosnia 1-0 in Zenica on Wednesday thanks to Raul Meireles's second-half goal in the second leg.

Portugal beat Bosnia 1-0 on Saturday in the first leg in Lisbon on a goal by Bruno Alves.

"It is difficult to comfort the boys, they are devastated. Kenan Hasagic had a nervous breakdown," Bosnia coach Miroslav Blazevic said. "But this is a young [team] and has potential to develop."

Backed by noisy fans, Bosnia made a lively start, pressing the Portuguese from the beginning but an Edin Dzeko header went over the crossbar and Vedad Ibisevic’s kick was too low to be a problem for Eduardo.

Bosnia may have had more of the ball but it was unable to open up the Portuguese back line.

Blazevic tried to boost the home attack in the second half by replacing Medunjanin with Zlatan Muslimovic.

It didn’t help and when Meireles scored the game was effectively over, with the Bosnians needing three goals to salvage qualification.

Frustrated fans threw objects on to the field, hitting assistant referee Paolo Calcagno in the head after Sejad Salihovic was dismissed after picking up a second yellow card.

Portugal substitute Edinho almost scored a second, but his 83rd minute shot was well saved by goalie Kenan Hasagic.