A Luke Byrne red card in first-half injury time resulted in Killian Brennan's penalty giving St Patrick's Athletic a 1-0 win over Shamrock Rovers in the SSE Airtricity League at Richmond Park.
After the break, Rovers lost their shape and attacking threat but the superb goalkeeping of Barry Murphy kept the game at 1-0.
He twice denied low drives from Conan Byrne and tipped a Chris Forrester shot onto the crossbar as Pat's climbed to fifth in the table.
Rovers' Ciaran Kilduff created the first real chance on eight minutes, as he laid the ball back to the onrushing Sean O'Connor but his tame shot was saved easily Brendan Clarke in the Pat's goal.
Three minutes later Stephen McPhail was lucky to stay on the pitch when his high foot caught Greg Bolger in the face.
Bolger was replaced by James Chambers as the midfielder suffered a suspected fractured jaw and was brought to hospital; referee David McKeon issued a yellow card to McPhail.
It was end to end with Forrester heading wide from a Chambers corner, Kilduff failing to hit the target following a Ronan Finn cross and Conor Kenna hitting the side netting as McPhail was central to every Rovers attack.
The cards remained in McKeon's pocket as McPhail was late with another tackle. Keith Fahey hit the top of the crossbar from a free kick as Pats gained the upper hand.
Bermingham linked up with Forrester down the left but his drag back was fired over by Chambers on the edge of the area.
As temperatures rose, McCabe and Fagan went tumbling in the Rovers area, McPhail was fortunate not to receive his marching orders for another late challenge and Fagan was late on Kenna. All went unpunished.
With a minute to go before the break, the game was turned on its head when Luke Byrne was sent off as Conan Byrne went tumbling in the penalty area. Up stepped Brennan to slot the ball past Murphy for a 1-0 lead for the Saints at half-time.
After the break Fagan was in on goal but failed to strike his effort cleanly as Rovers struggled to deal with their hosts, playing with 10 men. Then Liam Buckley's side took complete control.
Brennan swerved a free kick towards goal from the right side of the penalty area but Murphy pushed it wide for a corner. Conor McCormack saw yellow as the Inchicore side continued to dominate.
The Hoops were pinned back inside their own half and in a five-minute spell the game should have been beyond doubt for Pat's.
Within 90 seconds Murphy denied Byrne twice, first diving down to his left to push Byrne's low drive away on 61 minutes. He then dove to his right to parry another Byrne low drive after a mazy run.
Then Forrester fired left of the D from 25 yards and Murphy pulled off another great save, tipping the effort onto the crossbar on 65 minutes as Byrne continued to cause havoc down the right.
The visitors weathered the storm but failed to create anything at the other end. Gary McCabe fired straight at Clarke and substitute Rob Cornwall fired left and wide from long range but the home side held on.
The victory puts them fifth in the table, level on 12 points with Drogheda in fourth and four points behind Dundalk at the top of the table.