Derry City edged out St Patrick's Athletic in the FAI Cup final dress-rehearsal at the Brandywell.
Simon Madden put Derry ahead in the fifth minute and David McDaid doubled the Candystripes' lead on 40 minutes after good work by Barry McNamee.
Christy Fagan missed two first-half chances for Pat's but Chris Forrester did pull a goal back on 57.
James Chambers missed a further Pat's chance while Conor McKenna headed against the woodwork in stoppage time.
Madden struck Derry ahead after Jake Carroll had misjudged a long ball from Stewart Greacen.
Greacen came to Derry's rescue in the 34th minute when he blocked Fagan's close-range effort.
Derry were two ahead six minutes later as good work by McNamee set McDaid to score.
Fagan should have pulled back a goal for Pat's on the stroke of half-time after a dreadful McDaid backpass but the striker, with Greacen on the line, blasted over after he had rounded Gerard Doherty.
A rare Greacen mistake allowed Forrester to get Pat's back in the contest with a low finish on 57 minutes.
Doherty brilliantly denied Chambers seven minutes later although Pat's keeper Barry Murphy did equally well at the other end to block a Stephen McLaughlin chance.
The visitors went even closer in the final minute of injury-time as McKenna headed against the crossbar.
With Drogheda United beating champions Sligo Rovers on Friday night, St Pat's drop to third in the table while Derry improve to fifth after their third league win in a row.