They were nervously holding on after the concession of a late goal, but Cork City were not to be denied an 11th straight league win at Turner's Cross last night.
After captain John Dunleavy headed home Kevin O'Connor's corner on 88 minutes to make it 2-0, City conceded to Derek Foran in injury-time and the remainder of the game was a series of clearances, but they held out.
While it could have been more comfortable for John Caulfield's side, there was no denying that they deserved the three points, playing some great stuff in the first half, when they should have extended the lead afforded them by Sean Maguire's early penalty.
That they didn't was down to a combination of poor finishing and fine goalkeeping from Peter Cherrie.
The opening goal came early and while there may be misgivings in Dundalk about it being another spot-kick, City almost scored just before that.
From goalkeeper Mark McNulty's clearance, Karl Sheppard did well to take the ball down and his shot hit the post, rebounding off Cherrie.
From Stephen Dooley's corner, referee Paul McLaughlin deemed Bray defender Foran to be holding Ryan Delaney and from the resultant spot-kick Maguire sent Cherrie the wrong way.
Dunleavy's goal, coming just after Cherrie had denied him from Dooley's corner, made the most of his second chance.
Foran threatened to upset things but City weren't to be denied.