Substitute Aleksandar Trajkovski become the hero of Skopje as his 80th-minute strike earned the Former Yugoslav Republic of Macedonia only their second victory in FIFA World Cup qualifying Group A, moving them above opponents Wales in the process.
Ivan Tričkovski gave the home side the lead on 21 minutes but Aaron Ramsey levelled before the break from the penalty spot. However, Trajkovski was introduced just past the hour and was to settle the game.
The opener came when Tričkovski found himself with enough room inside a crowded Welsh penalty area to slot the ball past goalkeeper Boaz Myhill after David Vaughan had conceded a free-kick. Wales quickly settled back into the match and Craig Bellamy and Jonathan Williams created a string of half-chances between them from the left.
Bellamy's free-kick rebounded off the upright but on 39 minutes, Aaron Ramsey weaved his way into the FYROM penalty area from the right before being brought down. Ramsey dusted himself down to convert from the spot and level the score.
Both sides eyed victory as the second half become increasingly open, but the warning signs for Wales appeared on 71 minutes when Tričkovski was denied a second goal by a fine save from Myhill from close range. However, the goalkeeper was beaten for the second time as substitute Trajkovski found himself in space on the edge of the area to move FYROM off the bottom.