Linfield were forced to twice come from behind to eventually edge out Portadown at Shamrock Park.
The Ports moved in front after 12 minutes through Ruairi Croskery who was on hand to knock home the loose ball after a Sam Warde corner wasn't cleared.
Linfield levelled midway through the first half when Billy Chadwick teed up Christy Manzinga to send the ball through the legs of keeper Harry Doherty.
Manzinga then came close to putting Linfield into the lead around the half-hour mark but his header from Trai Hume's cross came back off the bar.
Portadown regained the advantage just before the break when, after some good work from Stephen Teggart, Lee Bonis was perfectly placed to head past Chris Johns.
Back came Linfield, however, on 67 minutes with Matt Green's first goal for the club after he met Kirk Millar's cross to turn it beyond Doherty.
But it fell to Manzinga to claim the win for the visitors with five minutes to go when he got past a defender before unleashing a powerful drive into the net despite the home keeper getting a hand to the ball.