Cork City's title ambitions suffered a huge setback on a chilly night in Richmond Park as late goals from Sam Verdon and Conan Byrne secured St Patrick's Athletic a well-earned victory.
The Saints led early on through lethal marksman Christy Fagan before Alan Bennett equalised on the stroke of half-time, a scoreline that stood until Verdon's spectacular intervention five minutes from time.
The devastating loss - combined with Dundalk's win over Longford Town - leaves John Caulfield's City side seven points adrift of the Lilywhites with three games to play.
Contrary to what was at stake for either side, it was the home team who began the game with a greater fire in their belly, culminating in an early shot wide from Lee Desmond.
And when Graham Kelly hustled Steven Beattie off the ball and forced a full-stretch save from Mark McNulty, it was beginning to appear a little one-sided.
The current Saints side are rarely too far away from a costly mistake, however, and a poor backpass from Ian Bermingham handed the league's top scorer with a chance to give City an early lead.
Maguire played a one-two with Stephen Dooley to send himself clear, and it took a magnificent covering tackle from Sean Hoare to send the ball bobbling perilously wide of the target.
Another defensive mishap gave Karl Sheppard a chance to beat Brendan Clarke, but he couldn't find the target, and City were made to rue their early profligacy.
With just over a quarter of an hour played, Michael Barker - moved up to midfield from defence for this game – exchanged passes with Ger O'Brien before picking out Christy Fagan.
The striker let the ball roll across his body, buying himself a yard of space from Bennett, and coolly rolled the ball left-footed into the corner of McNulty's goal.
It was no more than the Saints deserved for their early endeavour, but their last could have lasted barely a minute had Jamie McGrath not been stationed on the post to stoop and clear a Bennett header.
As the half wore on, the visitors' patient passing game began to stretch the Saints, and there were chances for Holohan, Sheppard, Bennett and Buckley, but crucially none found the target to test Clarke.
Conan Byrne should have doubled the Saints' advantage shortly before the break as the City defence failed to clear O'Brien's cross, but from close range he couldn't generate the power to beat McNulty.
And City levelled with the last kick of the first half in contentious circumstances as, no added time having been indicated, Bennett headed home O'Connor's inswinging corner with the clock just under a minute over.
City began to take more risks in the second half, and Pat's were fortunate Browne couldn't turn in Holohan's cross from close range, but they left themselves increasingly open at the back in the process.
They were fortunate Byrne remained honest when he was tugged bursting into the box, while the same player was inches from connecting with Kelly's ball over the top, while Bermingham forced another good save with a looping shot from distance.
Caulfield introduced under-19 winger Chiedozie Ogbene to add some pace to the attack, and he set up Beattie for a chance on the break that he blasted over when it should have resulted in City taking the lead.
And Verdon made them pay with just five minutes left on the clock when he smashed home from the edge of the area to send the home fans into raptures.
Cork hit the post as injury time approached before McGrath was upended in the box by former Saint Greg Bolger, and Byrne gleefully sent McNulty the wrong way to seal the win and leave City's title aspirations in smithereens.