Derry City suffered their first defeat in 14 games when Premier Division side Shamrock Rovers booked their place in the semi-final of the EA Sports Cup.
Goals from deadly duo Gary Twigg and Dessie Baker were enough for the visitors, however they were hanging on at the end when Mark Farren pulled a goal back in the closing stages.
Both sides made a host of changes to their starting line-ups, with City bringing in Eugene Ferry, James Henry, Thomas McBride, Adam Clarke and Vinny Sweeney, while Rovers had seven changes to their side that drew with champions Bohemians.
And it meant former Derry striker Tommy Stewart dropping to the bench for prolific marksman Twigg.
A dangerous free-kick from Dessie Baker on seven minutes caused problems in the home side's box, but Ferry did well to punch clear, while at the other end a Clarke free kick on 15 minutes found Sweeney at the back post but his header was straight at ex-Linfield man Alan Mannus.
Rovers were forced into a change on 27 minutes when Sean O'Connor had to replace the injured Paddy Kavanagh.
Rovers went close to breaking the deadlock on 40 minutes but Baker's diving header from |O'Connor's cross, was cleared off the line by the alert Mark Scoltock.
Stephen Kenny made two substitutions at the break with duo Patrick McEleney and Thomas McMonagle replacing Henry and Emmett Friars respectively.
Despite the changes it was visitors who took the lead on 49 minutes when O'Connor's cross following a tremendous move ended with Twigg finally breaking his duck against Derry, heading home from 12 yards.
The home side had strong claims for a penalty minutes later but referee Declan Hanney waved play on, after Farren looked to have been brought down inside the area by Mannus.
Rovers doubled their advantage on 58 minutes following a defensive mistake by Scoltock, which allowed Baker to get in behind and he calmly blasted the ball home past a stranded Ferry.
Ferry came to his side's rescue on the hour mark when he kept out Baker's sliding effort, after Twigg's initial cross into the danger zone had picked out his fellow front man.
The Brandywell men produced a barnstorming finish when they pulled one back on 84 minutes thanks to Farren, firing home from close range after Mannus could only parry away McEleney's initial effort, but it was too little, too late.
Derry City: Ferry, McCallion, Scoltock, Friars, Cassidy; Sweeney, Molloy, McBride, Henry, Clarke; Farren. Subs: McEleney and McMonagle for Henry and Friars (45); McDaid for Clarke (68).
Shamrock Rovers: Mannus, Flynn, Price, Murray, Murphy; Kavanagh, Turner, Bradley, Cahill; Twigg, Baker. Subs: O'Connor for Kavanagh (27); Stewart and Bayly for Baker and Cahill (71).
Referee: Declan Hanney (Dublin).