Christophe
Berra headed Matt Ritchie's corner past Michael McGovern in the 85th-minute for
the dominant Scots.
The win served as a worthwhile warm-up for Gordon Strachan's
side ahead of their European Championship qualifier against Gibraltar on
Sunday.
Northern Ireland, too, can take heart from some fine individual
displays ahead of their meeting with Finland.
Jonny Evans, Aaron Hughes and Chris Baird impressed as the
visitors played deep and challenged Scotland to try to break through a
well-organised defensive shape.
Gibraltar will seek to do the same at Hampden at the weekend, so
the friendly turned into an occasion for the Scots to hone their attacking
play.
They were at their sharpest down the left, where Ikechi Anya's
fearsome pace was a constant threat, and tended to leave Paddy McNair looking
vulnerable.
The young Manchester United defender was one of several fringe
players that O'Neill brought to the fore.
MK Dons' Will Grigg led the line, where he was often isolated,
while Josh Magennis of Kilmarnock was a powerful and direct runner down the
right.
Brentford's Stuart Dallas and MK Dons' Ben Reeves, both earning
their second caps, were intermittently busy.
So,
too, was Northern Ireland goalkeeper Michael McGovern.
His interventions often came after Anya had burst to prominence.
On one occasion, the left winger raced into the penalty area, then cut the ball
back for Steven Fletcher whose snap shot was turned over by Hamilton's
McGovern.
The Northern Ireland goalkeeper had to dive smartly to push an Anya
shot wide, then when the winger was played into the penalty area by James
McArthur, he shot wide from a good position.
A clever reverse pass from Shaun Maloney provided a shooting
opportunity for Steven Fletcher, but McGovern dashed out quickly to block.
Evans was marshalling the visiting defence, in the midst of a
domestic ban for spitting at the Newcastle United striker Papiss Cisse.
The Manchester United centre-back was composed throughout,
helped by the solid reliability of his partner, Brighton centre-back Hughes,
and by the industry and conscientious running of West Brom's Baird and
Huddersfield's Oliver Norwood in midfield.
The approach was to try to deny Scotland, rather than control
the game, but Northern Ireland pressed more assertively, and higher up the
field, after the break.
Scotland were less able to control the game, as substitutions
disrupted their rhythm as much as the visitors' approach.
Steven Naismith carried a threat in the air, though, flashing
one header over from Craig Forsyth's cross, then seeing an effort from
Ritchie's corner saved by McGovern.
Ritchie drifted in and out of the game on his debut, but there
was promise in the delivery from his left foot.
Familiar faces came on to bolster Northern Ireland, including
former Rangers midfielder Steven Davis and his one-time Celtic rival Paddy
McCourt, while another - Magennis - came close with a shot across the face of
goal.
The game seemed destined to finish as a stalemate, but Ritchie's
delivery from set-pieces tended to be threatening and Scotland finally made the
breakthrough when Berra headed his corner kick past McGovern.
There were only four minutes left, and Northern Ireland had no
riposte.