(REUTERS) - Northern Ireland battled to break down stubborn San Marino for over an hour, then scored three times in seven minutes, including two from Josh Magennis, in a 3-0 World Cup qualifying win on Friday.
The visitors dominated the Group C game as expected but could not find a way past Aldo Simoncini and were beginning to look as if they could drop two crucial points before Magennis turned in a Steven Davis cross 20 minutes from time.
With San Marino's resistance broken, Magennis headed in Conor Washington's cross from the right and Davis converted a penalty in the 77th minute after Alex Gasperoni was ruled to have handled the ball in the box.
Northern Ireland stayed second in the group with 16 points, five behind leaders Germany and seven ahead of the Czech Republic.
A draw at home to the Czechs on Monday will guarantee them second place.
The group winners qualify directly for Russia while the eight best second-placed teams in the nine groups go into a play-off round.