Linfield are in with a good chance of progressing in the Europa League after winning away at B36 Torshavn of the Faroe Islands in Thursday's first leg.
Jamie Mulgrew fired Linfield into the lead with a fine shot from the edge of the box in the 39th minute.
Adeshina Lawal headed Torshavn's equaliser 12 minutes from the end.
However, manager Warren Feeney was able to celebrate victory in his first game in charge as Michael Carvill scored the winner on 88 minutes.
Full-back Matthew Clarke delivered a low ball from the left, substitute Peter Thompson touched it on and Carvill pounced in front of goal for the vital score.
The second leg is at Mourneview Park on Tuesday, 8 July.
Former Northern Ireland striker Feeney would have been disappointed if Carvill had not given them the advantage going into the return game, which is being played in Lurgan because Linfield's Windsor Park ground is undergoing a major redevelopment.
It looked like Mulgrew's shot - from an Aaron Burns lay-off - was going to be enough.
But the visitors' defence was found wanting as Adeshina was left free to head in from Roaldur Jacobsen's free in from the right.
Linfield manager Warren Feeney: "I am absolutely delighted with what the boys have done - they have just been back two weeks.
"The fitness levels are not what they should be yet, but there was a hunger in every single one of them.
"I have told them it is only half-time really and we have to finish the job off."
Match-winner Michael Carvill: "I was delighted to score but the most important thing was to get the win, because we played very well and to come away with a draw would have been a bit unfair to us".
"We did well in the first half, Jamie put us 1-0 up and we said at half-time we needed to keep it tight.
"They (Torshavn) scored and we thought maybe a 1-1 draw would be all right, but I think we knew we had enough in the locker to go and win it and I was delighted I could help the lads and get a win in our first game."
B36 Torshavn: Thomsen,Faero (Simun Joensen 63), Eriksen, Thorleifsson (Sorensen 90), Eysturoy, Hordur Askham, Jacobsen, Matras, Adrian Cieslewicz (Rogvi Poulsen 89), Lukasz Cieslewicz, Lawal.
Subs not used: Trygvi Askham,Danielsen,Nielsen,Heinesen.
Linfield: Tuffey, Richards, Hegarty, Matthew Clarke, Haughey (Callacher 30), Sproule, Lowry, Burns, Mulgrew, Waterworth (Thompson 74), Carvill (Morrow 90).
Subs not used: Ross Glendinning, Reece Glendinning, Quinn, Ross Clarke.
Referee: Nikola Popov (Bulgaria).