Three men were sent off as UCD fought back to enjoy a share of the spoils against St Patrick's Athletic at Richmond Park.
Before a crowd of almost 700, first-half goals from Sean O'Connor and David McMillan had put St Pat's in the driving seat.
But the turning point in the game came when St Pat's goalkeeper Gary Rogers was sent off for taking down Darren Meenan in the box in the second half.
Dean Marshall converted the spot kick in the 71st minute before Graham Rusk headed in the equaliser a minute later.
The drama wasn't finished, however, as both Meenan and St Pat's midfielder Shane McFaul were also sent off in injury time.
UCD started the stronger and Robbie Creevy did well to get on the end of Meenan's neat through ball after four minutes.
Creevy took a low shot from the edge of the box but Evan McMillan raced in and made the vital block.
The home side then went on the attack and took the lead a minute later.
Jake Carroll turned Sean Harding in the corner and whipped in an inch-perfect cross for O'Connor, who smashed a terrific drive past Ger Barron into the bottom left corner.
Creevy had a chance to get UCD back into the game on ten minutes but, despite being in a good position, sent his shot wide right of Rogers' goal.
UCD kept up the good work and Paul O'Conor should have done better with his header on 11 minutes.
Having jumped well to meet Harding's cross, he didn't get good enough contact and headed wide. Rogers then saved O'Conor's tame shot a couple of minutes later.
At the other end, David McMillan hit the post with his low drive on 15 minutes and O'Connor sent a weak free-kick directly at Barron.
UCD nearly opened their account following a wonderful move on 23 minutes.
Creevy's pass found Meenan, who played in Rusk, but Rogers bolted from his line and dispossessed Rusk inside the six-yard box.
Rusk threatened again on 26 minutes when he got his head to Harding's cross but again, he missed the target.
UCD enjoyed a good period of pressure that started just after the half-hour mark, with several excellent scoring chances.
Evan McMillan cleared off the line from Rusk in the 36th minute, then Rogers smothered Marshall's chance in the six-yard box after Harding's initial effort was blocked.
St Pat's lost Stephen Bradley to injury on 41 minutes and the former Shamrock Roverers midfielder was replaced by Paul Crowley.
Bradley went straight to the dressing room for treatment, suggesting he hadn't fully recovered from the knock he took in Thursday's UEFA Europa League defeat to Karpaty Lviv in Tallaght.
St Pat's had been quiet enough up front for long periods but finished the first half in spectacular fashion.
UCD lost the ball on the left wing and David McMillan pounced about 30 yards out and smashed a sensational long-range shot that gave Barron no chance.
St Pat's started the second half in similar style with David McMillan and Dave Mulcahy combining to put Derek Doyle through on goal. But Doyle dragged his shot wide.
Creevy's overhead kick for UCD in the 50th minute also failed to find its target.
Doyle could have done better in the 63rd minute when he got a foot to Michael Leahy's headed clearance, but he fired wide from the left of the UCD box.
Then came the dismissal of Rogers. Conor Kenna's backpass on 68 minutes was intercepted by Meenan who was then taken down in the box by the Saints keeper.
Referee Derek Tomney pointed to the penalty spot and showed a straight red card to Rogers.
O'Connor was the man who St Pat's boss Pete Mahon chose to withdraw to allow substitute goalkeeper Chris Bennion on.
Marshall cracked his spot kick past the former Shelbourne and Athlone Town net-minder.
The momentum was with UCD now and it got better for them just a minute later when Rusk rose highest in the area to meet Meenan's ball and head past Bennion.
A storming finish saw Crowley hook his shot just over the top for St Pat's on 82 minutes and Bennion palm away O'Conor's shot four minutes later. Rusk then headed Sean Russell's cross over in the 90th minute.
The referee then flashed two more red cards in injury time. Meenan was dismissed for dissent having just been show a yellow before McFaul received his second booking for taking a free kick before the referee had blown his whistle.