The Republic of Ireland’s U-23 squad just need a point from their final group game against Belgium to reach the International Trophy final after an injury-time goal from Stephen Rice won this tie against Northern Ireland in Lurgan, writes RTÉ's John Kenny.
Pat Fenlon will be the happier of the two managers after his side grabbed an undeserved three points against a Northern Ireland side that could feel hard done by, such was their dominance over the 90 minutes.
However, David Jefferey's side could not force a winner in a poor contest - watched by new Republic of Ireland manager Giovanni Trapattoni - and just as it looked to be heading for a 0-0 draw, Paul Keegan swung in a free-kick and Rice’s diving header won the contest.
The start of the game was delayed for nearly 25 minutes in an argument over the colour of socks, with both sides arriving in white.
After a stand-off, it was finally agreed that the home side would wear blue, and the players finally took to a Glenavon pitch which was nothing short of a disgrace - hard, bumpy and bare in patches.
As players took time to settle on the poor surface, 17 minutes passed before the first real action.
Shane Guthrie's long ball found Stephen Rice, who in turn played in Dave Mooney, but his first-time volley was brilliantly saved by Dwayne Nelson in the home goal.
Almost immediately, Thomas Stewart hit the crossbar for Northern Ireland with a header, and David Scullion could not force the rebound over the line.
On the half hour, Barry Holland’s cross was headed on by the Republic’s centre-half Conor Kenna straight to Peter Thompson, who proceeded to hit the post when it seemed easier to score.
Damien Mulgrew also went close for Jefferey's side in the latter stage of the first half, as the home side ended the period on top.
Fenlon made a switch at half-time bringing on Dennis Behan for the ineffective John Paul Kelly, with Mark Quigley, who started upfront, switching to the right wing.
But it made little difference as the home side continued to see more of the ball and Holland’s shot on the hour mark just missed the far post, while Craig McLean’s long-range effort was easily dealt with by the Republic’s goalkeeper Barry Murphy.
There were very few chances after that until Rice's stunning diving header won it for the Republic.
The Republic of Ireland’s final game of the group is a home game against Belgium in November, where a draw will suffice in their efforts to make the final.
Northern Ireland: (Manager: David Jeffery)
Nelson (Dungannon); Holland (Cliftonville), Watson (Ballymena -Capt), Lindsay (Linfield), McClean (Ballymena); Mulgrew (Linfield), Ward (Glentoran), Clarke (Newry), Scullion (Glentoran - Garrett Newry 57); Thompson (Linfield), Stewart (Linfield - McAllister Dungannon 73).
Republic of Ireland: (Manager: Pat Fenlon)
Murphy (Shamrock Rovers); O’Brien (Shamrock Rovers), Kenna (UCD - Murphy Cork 76), Guthrie (Cobh Ramblers), Powell (Bohemians); Kelly (Bohemians - Behan Cork City 45), Keegan (Drogheda - Capt), Rice (Shamrock Rovers), Brennan (Bohemians); Quigley (St Pat's - Rowe Bray 65), Mooney (Cork City).
Referee: Adrian McCourt (Dungannon).