Match ends, Scotland 1, Northern Ireland 0.
Scotland 1-0 Northern Ireland
Scotland were eventually rewarded for a patient performance with a late winning goal against Northern Ireland.
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 Reading'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.
- 1GordonSubstituted forMcGregorat 45'minutes
- 2WhittakerSubstituted forRussellat 78'minutes
- 5MartinSubstituted forBerraat 45'minutes
- 6McArthurSubstituted forMorrisonat 63'minutes
- 10MaloneySubstituted forNaismithat 45'minutes
- 9FletcherSubstituted forRhodesat 63'minutes
- 5EvansSubstituted forMcCulloughat 81'minutes
- 16NorwoodSubstituted forDavisat 69'minutes
- 6BairdSubstituted forHodsonat 58'minutes
- 21MagennisSubstituted forMckayat 75'minutes
- 14ReevesSubstituted forMcLaughlinat 70'minutes
- 22GriggSubstituted forMcCourtat 58'minutes
- Shots on Target
Second Half ends, Scotland 1, Northern Ireland 0.
Attempt saved. Jordan Rhodes (Scotland) right footed shot from outside the box is saved in the bottom left corner. Assisted by Steven Naismith.
Foul by Jordan Rhodes (Scotland).
Aaron Hughes (Northern Ireland) wins a free kick in the defensive half.
Goal! Scotland 1, Northern Ireland 0. Christophe Berra (Scotland) header from very close range to the top right corner. Assisted by Matt Ritchie with a cross following a corner.
Corner, Scotland. Conceded by Paddy McCourt.
Attempt missed. Billy McKay (Northern Ireland) header from the centre of the box is too high. Assisted by Paddy McCourt following a corner.
Corner, Northern Ireland. Conceded by Jordan Rhodes.
Corner, Northern Ireland. Conceded by Allan McGregor.
Corner, Northern Ireland. Conceded by Ikechi Anya.
Attempt blocked. Luke McCullough (Northern Ireland) left footed shot from the left side of the box is blocked.
Foul by Craig Forsyth (Scotland).
Billy McKay (Northern Ireland) wins a free kick on the right wing.
Substitution, Northern Ireland. Luke McCullough replaces Jonny Evans.
Substitution, Scotland. Johnny Russell replaces Steven Whittaker.
Substitution, Northern Ireland. Billy McKay replaces Josh Magennis.
Christophe Berra (Scotland) wins a free kick in the defensive half.
Foul by Josh Magennis (Northern Ireland).
Attempt saved. Matt Ritchie (Scotland) left footed shot from outside the box is saved in the bottom right corner. Assisted by Steven Whittaker.
Attempt saved. Steven Naismith (Scotland) header from the centre of the box is saved in the centre of the goal. Assisted by Matt Ritchie with a cross.
Corner, Scotland. Conceded by Jonny Evans.
Attempt missed. Ikechi Anya (Scotland) header from the centre of the box misses to the right. Assisted by Matt Ritchie with a cross following a corner.
Corner, Scotland. Conceded by Lee Hodson.
Attempt blocked. Ikechi Anya (Scotland) left footed shot from a difficult angle on the left is blocked. Assisted by Jordan Rhodes.
Substitution, Northern Ireland. Ryan McLaughlin replaces Ben Reeves.
Substitution, Northern Ireland. Steven Davis replaces Oliver Norwood.
Attempt missed. Matt Ritchie (Scotland) left footed shot from outside the box misses to the left. Assisted by Steven Naismith.
Attempt missed. Josh Magennis (Northern Ireland) right footed shot from the right side of the box misses to the left. Assisted by Ben Reeves.
Substitution, Scotland. Jordan Rhodes replaces Steven Fletcher.
Substitution, Scotland. James Morrison replaces James McArthur.
Foul by Steven Fletcher (Scotland).
Jonny Evans (Northern Ireland) wins a free kick on the left wing.
Substitution, Northern Ireland. Paddy McCourt replaces William Grigg.
Substitution, Northern Ireland. Lee Hodson replaces Chris Baird.
Ikechi Anya (Scotland) wins a free kick in the defensive half.
Foul by Patrick McNair (Northern Ireland).
Attempt missed. Steven Naismith (Scotland) header from the left side of the six yard box is just a bit too high. Assisted by Craig Forsyth with a cross.
Steven Naismith (Scotland) wins a free kick in the defensive half.
Foul by Jonny Evans (Northern Ireland).