Paris - Bosnia-Herzegovina have reached their first ever major finals on Tuesday as a 1-0 win over Lithuania saw them confirm their place at next year's World Cup.
They will be joined by Russia, who had not reached a World Cup finals since 2002 and who sealed their place at Brazil 2014 with a 1-1 away draw in Azerbaijan.
Bosnia --who had lost twice to Portugal in play-offs for the 2010 World Cup and Euro 2012 -- progress at the expense of Greece, who go into the play-offs, while Portugal finish runners-up to Russia and will also contest a winner takes all play-off.
The final two automatic European places will be decided later on Tuesday with four teams in the running, holders Spain, France, England and Ukraine.
Vedad Ibisevic was Bosnia's hero as he scored what was the most important of his 20 international goals as the 29-year-old Stuttgart striker struck in the 68th minute.
His sidefooted effort came just two minutes after he had seen another shot brilliantly saved by Giederius Arlauskas, who had denied Bosnia throughout the match in a stunning performance.
Arlausakas's performance could be put into the context that only the Germans and the Dutch have scored more goals in the qualifying games than the Bosnians.
Greece by contrast have failed to sparkle in front of goal and were only able to beat Liechtenstein 2-0 in Athens.
Dimitris Salpingidis scored in the seventh minute but the goal shy Greeks -- who had only scored 10 goals going into the match from their previous nine qualifiers -- failed to add to that until veteran Giorgos Karagounis, appearing in his 130th game for the national side, scored with a free kick nine minutes from time.
Russia too scored early on in Baku, Roman Shirokov netting for the visitors, and although Azeri substitute Vagif Dzhavadov levelled in time added on a point was still enough for the Russians to progress.
Portugal, who were missing the suspended Cristiano Ronaldo, got on top early at home to Luxembourg as Silvestre Varela and Nani scored in the first-half - but only after Luxembourg had had a player sent off.
However, they were only able to add one more in the second-half as veteran striker Helder Postiga scored 11 minutes from time.
Portugal and Greece will learn who their opponents are in the play-offs in the draw next Monday.