Craig Hill fired home from the edge of the box three minutes into added time to give Ballinamallard victory over Dungannon Swifts at Stangmore Park.
In the first half, Niall Morgan saved well from James McKenna, Leon Carters headed against the woodwork and Andy Crawford and Ryan Campbell had chances.
Alvin Rouse saved a Stephen O'Neill effort at the other end.
Johnny Topley and Grant Hutchinson hit the bar for the Swifts before Hill scored with that late breakaway goal.
Swifts manager Darren Murphy was shown a red card after the conclusion of the game.
Dungannon have now won just one of their last 13 matches while Mallards end a run of three successive defeats.