Cork advance to face Cyprus' AEK Larnaca in the second qualifying round of the Europa League after a hat-trick from Seán Maguire propelled the Leesiders to a 4-2 victory (6-2 on aggregate) in the second leg of their first-round tie against Levadia Tallinn.
A sold-out Turner's Cross (an attendance of 6,314) were rejoicing at the finish but at the break they trailed 2-1.
However, three second-half goals from Maguire gave John Caulfield's side a 6-2 aggregate victory over the Estonians, as the Preston-bound striker took his competitive tally for the season to 22 goals in all competitions.
Karl Sheppard grabbed City's first half goal and they only had to wait 30 seconds after the interval for their second.
Garry Buckley broke down the wing before finding Sheppard whose low cross was clinically finished to the net by Maguire from close range. With four minutes remaining, Maguire beat Sergie Lepmets after being teed up by sub Achille Campion.
The SSE Airtricity League's leading goalscorer completed his hat-trick in the last minute of normal time when , heading home from Shane Griffin's corner.
Leading 6-1 from the first leg the Superliga men were always on the front foot and in striker Paul Onuachu, they had a big front man who netted a hat-trick.
For City goalkeeper Gerard Doherty it was a busy night and despite the final outcome he produced a string of top draw saves to deny Onuachu, Jakob Poulsen and Tim Sparv.