Shamrock Rovers moved to the top of the Premier Division table thanks to a Thomas Stewart double at Tallaght Stadium.
Pat's nearly snatched a point at the death but Rovers goalkeeper Alan Mannus saved a penalty in injury time from Ryan Guy after Billy Dennehy, who was red carded, handled the ball on the line.
Derek Doyle put Pat's ahead five minutes into the second half with his fourth goal in two games but two fantastic Stewart strikes sent the Tallaght hoops to the summit.
Rovers had a chance to open the scoring came on ten minutes when Stewart sent a low ball across the face of goal. It was begging for a leg or head to knock it into Gary Rogers' net but nothing came and Pat's cleared.
Stewart was having a cracking start and smashed a hard drive off the post a minute later.
On 14 minutes, Guy connected with Damian Lynch's pass and sent a cross into the box but Mannus made the save before Pat's Dave Mulcahy and David McAllister could get a head on the ball.
Shane Guthrie crashed a shot over the bar on 25 minutes after the Rovers defence could only clear a Doyle corner into his path.
Mannus then saved well from Doyle on 28 minutes before the action swung to the other end and Dan Murray headed a Paddy Kavanagh corner wide on 29.
The action was back in the Rovers box seconds later as Mannus made another save from a Doyle shot.
On 44 Dennehy made a superb run down the wing and his cross eventually fell firstly to Stewart and then Gary Twigg in the box but Twigg's shot cannoned off Ian Bermingham. Rogers then saved a James Chambers shot as Rovers finished the half in style.
Rovers had enjoyed most of the best chances over the course of the game so it came as a surprise when Pat's took the lead on 50 minutes when Doyle pounced when Lynch's free was cleared out and shot a neat low drive past Mannus.
Rovers fought back in attacking with a positive attitude and Stewart put them level on 64 minutes. Kavanagh and Chambers were involved in the build up with Stewart firing an absolutely spectacular shot into the top left of Rogers' goal.
Chambers was provider again on 81 when his ball into the box caused concern for Pat's. It fell again for Stewart who smashed in his second of the night.
Dennehy then took an early shower when he handled on the line on 90 and Mannus saved the three points with his save from Guy.