St Patrick's Athletic withstood a spirited second-half comeback from Cobh Ramblers to book their spot in the FAI Cup semi-final draw with an entertaining 3-2 win at Richmond Park.
First-half goals from Christy Fagan, Jamie McGrath and Billy Dennehy meant the Saints appeared to have the tie sewn up at half-time.
However, a penalty just after the break from Connor Ellis, and a second from Rob Lehane, led to a nervy finale few would have anticipated during a routine opening half.
Cobh boss Stephen Henderson had set his side up to frustrate the hosts, parking five at the back with Ian Mylod and Charlie Fleming operating as deep-lying wing backs.
The flaws were obvious from the start, however, as Pat's targetted Mylod's lack of natural defensive prowess by pushing captain Ger O'Brien high up the pitch.
And it was from a move on the right that the Saints had the ball in the net first, as Fagan's scuffed shot found its way to the inrushing Billy Dennehy to slot home, only to be called back for offside.
Moments later, O'Brien stepped forward to unleash a shot from distance that just about grazed the frame of the goal at the top-right corner as Pats inched closer to making the breakthrough.
Inevitably, the move that led to the opener began on the right-hand side as Conan Byrne was afforded far too much time to pick out Fagan, whose close-range header beat Paul Hunt at his near post.
They made it 2-0 just past the midway point in the first half as the Rams failed to deal with an O'Brien cross and the ball sat up perfectly for McGrath to hammer in from close range.
Liam Buckley's side refused to let up and looked to finish the tie as a contest before half-time, and in that they were aided by a cataclysmic piece of defending from the Rams that led to the third goal.
Mylod and Ben O'Riordan got themselves into all sorts of difficulty attempting to play out from their own box, allowing Conan Byrne to intercept and slide the ball across for Dennehy to find the net again, and this time there was no offside flag.
A mistake from Michael Barker presented Creamer with another chance shortly before half-time, but with Clarke a long way off his line Creamer over-hit his attempted lob, and he was replaced at the break.
In Creamer's stead came Ellis, the 19-year-old loanee from Cork City, and the teenager made an immediate impression as he took a pass from Lehane and fell under the challenge of Barker to earn the Rams a penalty.
The decision seemed harsh as Barker appeared to get the ball, and Sean Hoare was booked for complaining, but Ellis stepped up and slotted a confident penalty low to Clarke's right, though the keeper went the right way.
And the Rams cut the deficit to one just after the hour as Barker lost out to the industrious Lehane from a long throw, and the former Cork City man rode the follow-up challenge and rolled the ball into the corner of Clarke's net.
Pats had the ball in the net again soon after as Fagan volleyed home expertly from Dennehy's left-wing cross, but again the offside flag came to Ramblers' rescue.
The visitors had chances to equalise in the final minutes as Shane O'Connor shot over and Clarke was forced to punch Chris McCarthy's header off the line with Ellis, but their efforts ultimately fell just short.