Northern Ireland marked the opening of the new national stadium with a win - but it was a night of deep frustration against San Marino.
Michael O’Neill’s side dominated against the minnows, who have never won a competitive game.
But it took 75 minutes for the points to be secured as the home side wasted a series of chances.
They had led through man of the match Steven Davis’s first half penalty.
San Marino were then reduced to 10 men early in the second half.
But as chance after chance was spurned, the home fans’ frustration grew.
It took the introduction of fans’ hero Kyle Lafferty to kill the game.
He netted six minutes after coming on to confirm the win, with Jamie Ward netting the third soon afterwards.
Lafferty added his second - Northern Ireland’s fourth - with the final kick of the night.
It leaves Northern Ireland on four points after the opening two games as they bid to qualify for the 2018 World Cup.
But Michael O’Neill will know improvement will be needed against world champions Germany in Hannover on Tuesday night.
Northern Ireland then play Azerbaijan in Belfast on November 11.
On a frustrating night, it took 25 minutes to break down San Marino.
The opener came from the spot after the referee spotted a foul on Josh Magennis as he tried to connect with a cross from Shane Ferguson.
Davis took responsibility for the penalty and, while the goalkeeper got his hands to it, the pace of the strike beat him.
It was a moment of history from the skipper, who became the first player to score at the redeveloped national stadium.
Ahead of kick-off a parade of sporting legends had marked its official opening.
Boxer Carl Frampton, former world snooker champion Dennis Taylor and Olympic gold medal winner Mary Peters were among those present.
San Marino had lost their last 34 World Cup qualifiers, conceding 154 goals, but managed to keep the home side to one goal in the first half.
Early on Niall McGinn swung over a cross from the right but Stuart Dallas, arriving at the back post, couldn't convert.
The best move of the first half saw Davis break at pace, exchange passes with Ward, only to shoot well wide.
Then Ward’s header drew a smart save from the goalkeeper.
The second half started better as Ward tested the ‘keeper with a well-struck effort from the edge of the area.
San Marino were reduced to 10 men when Mirko Palazzi, already booked for an early challenge on McGinn, was shown a second yellow.
He tried to block a quick throw-out from the goalkeeper, ending his night.
Northern Ireland began to up the pressure against the 10 men.
McGinn cut in from the wing and drew a brilliant save from the goalkeeper. The ball rebounded to Dallas, but he fired over.
Northern Ireland were camped around the visitors’ box, laying siege to the goal with a series of crosses and shots.
But each time it ended in frustration through a combination of last-ditch defending and poor execution.
Ward was next to threaten, cutting inside and drawing another fine save from the goalkeeper, who then got down to deny Magennis.
Aldo Simoncini foiled Ward for a second time in a matter of minutes, with sub Conor Washington firing the rebound wide.
Lafferty was introduced in place of Magennis and, in the 79th minute, finally made the game safe.
Ferguson crossed from the left and the striker tapped home from close range.
Ward made it 3-0 in the 85th minute.
Again Ferguson and Lafferty were involved, the latter heading down Ferguson’s cross for Ward to smash home.
And with the game’s final kick Lafferty made it four, firing home after being teed up by the impressive Davis.
NORTHERN IRELAND: McGovern, McLaughlin (McNair, 77), J Evans, McAuley, Ferguson, McGinn, Davis, Norwood, Dallas (Washington, 65), Ward, Magennis (Lafferty, 73)
SAN MARINO: Simoncini, Berardi, Vitaioli, Simoncini, Valle, Palazzi, Hirsch (Cesarini, 55), Tosi, Coppini (Golinucci, 71), Vitaioli, Stefanelli
Referee: Istvan Kovacs (Romania)