Macedonia 0-2 Republic of Ireland
Republic skipper Robbie Keane became the first Irish or British player to reach 50 international goals with his opening strike against Macedonia.
Keane netted the other as the Irish got the win they needed to stay right in contention to qualify for Euro 2012.
Keane's first goal was a fortunate deflection in the seventh minute and he was gifted the second by defender Boban Grncharov's disastrous miskick.
Macedonia had a chance to respond but Ivan Trickovski's penalty hit the bar.
With Slovakia and Russia also winning their Group B matches on Saturday, Giovanni Trapattoni's Republic stay in third, tied on 13 points with both of their qualification rivals.
Having seen previous campaigns flounder by failing to win in Macedonia, captain Keane's early goal will have been a huge boost to the Irish supporters who had made the trip to Skopje.
Level with England great Sir Bobby Charlton on 49 goals going into the match, 30-year-old Keane reached the half century with an ambitious effort from distance.
The wicked deflection off defender Nikolce Noveski saw the ball sail over the stranded keeper Martin Bogatinov.
Pandev had a brilliant chance to equalise when found free in front of goal but keeper Shay Given blocked at close-range.
Macedonia had a strong penalty claim waved away by German referee Florian Meyer when John O'Shea appeared to have caught Inter Milan striker Goran Pandev.
Things went from bad to worse for Macedonia as, with 36 minutes gone, Grncharov miskicked as he attempted to feed Noveski's pass back to Bogatinov and Keane gleefully accepted the gifted opening.
Five minutes before half-time Macedonia looked to have been given a route back into the match as O'Shea fouled Pandev inside the box for a penalty.
But, with Given committed to his dive, Trickovski smashed the spot-kick against the crossbar to let Ireland off the hook.
Macedonia had the ball in the net early in the second half but Pandev had handled Goran Popov's deep cross before stabbing a close-range shot past the Given.
Macedonia: Bogatinov, Grncarov, Noveski, Sikov, Popov, Sumulikoski, Demiri (Savic 71), Despotovski (Gjurovski 56), Pandev, Trickovski, Naumoski (Hasani 10).
Not used: Nuredinovski, Mojsov, Todorovski, Ristevski.
Republic of Ireland: Given, Kelly, O'Shea, O'Dea, Kilbane, McGeady, Whelan, Andrews, Hunt, Cox (Long 64), Keane.
Not used: Forde, McShane, Coleman, Fahey, Keogh, Foley.
Referee: Florian Meyer (Germany)