Serbia clinched a spot at the 2018 FIFA World Cup with a 1-0 win over Georgia.
Aleksandar Prijovic scored after coming on as a second-half substitute to cement Serbia’s place in Russia, ending an eight-year major finals absence.
Prijovic struck the winner on 74 minutes in Belgrade as Serbia finished top of Group D, with the Republic of Ireland heading to the play-offs after a 1-0 victory over Wales in Cardiff.
“I think we deserved this, although it turned out that the last step was the most difficult one, but we succeeded,” coach Slavoljub Muslin said.
Prijovic said the goal was the most important in his career.
“It was a dream since (my) childhood to score an important goal for the state,” he said.
James McClean broke Welsh hearts with a thunderous 57th-minute strike to keep Irish dreams alive as they leapfrogged their opponents, without the injured Gareth Bale, into second place.
Ireland remain on course for a first World Cup finals appearance since 2002, as surprise Euro 2016 semi-finalists Wales saw their dream of a first trip to the tournament since 1958 turn to dust.
“The players were magnificent playing away from home at a very good Welsh side. To win on their territory was a great result for us,” Ireland manager Martin O’Neill told Sky Sports.
“We are in the play-offs. Whenever the draw is made we will take our chance.”
Wales manager Chris Coleman admitted the consequences of a first competitive home defeat in four years were tough to digest.
“My players have given everything but it wasn’t enough in the end to get over the line,” he said. “It will hurt for a bit but you learn from defeat and we will learn from tonight.”
Asier Illarramendi netted the only goal in Jerusalem as Spain completed their successful qualifying campaign with a 1 -0 win over Israel, while Antonio Candreva grabbed a second- half winner for Italy in a 1-0 victory away to Albania in Group G.
Italy will be the top seeds for the November play-offs, the draw for which is made in Zurich on October 17.