Dungannon Swifts fought back from a goal down to earn a merited Premiership win over Portadown at Stangmore Park.
Chris Casement put the Ports ahead on 11 minutes after great work by Sean Mackle but Andrew Burns levelled for the Swifts eight minutes later.
More poor defending from the Ports allowed Ryan Harpur to strike Dungannon ahead in the 29th minute.
Mackle hit the Swifts woodwork but Dungannon wasted other chances before Paul McElroy's superb late goal.
The Ports took the lead after Mackle's clever footwork set up Casement to side-foot home from close range.
However, Portadown's good start was undone by poor defending which allowed Burns to level on 19 and Harpur to put the home side ahead on 29 after good work by Andrew Mitchell.
Mackle was unfortunate not to level late in the first-half as he hit the woodwork with a curling effort while Murray also nodded another Ports chance wide before the break.
Dungannon produced some fine football after the break with David Armstrong firing just wide and Jamie Glackin also going close.
As Portadown regrouped, Gary Twigg missed a glorious chance to equalise as he nodded wide while Mackle had another opportunity to level before his effort was blocked.
McElroy sealed Dungannon's victory in the first minute of injury-time as he fired in a superb left-foot shot.