Derry are into the Ulster Football Championship final for the first time in 11 years after an impressive win over Armagh in Clones.
The Oak Leafers looked in command with Mark Lynch's goal helping them to a 1-8 to 0-6 interval advantage.
But Michael O'Rourke's goal straight from the second-half throw-in quickly reduced the gap to just two points.
However, goals in the 47th and 56th minutes by Eoin Bradley and Conleth Gillgan made sure of Derry's progress.
Man of the match Bradley, who landed five points in the first half, was left clear to run on to a long ball before skilfilly lifting the ball over Armagh keeper Paul Hearty.
Gilligan, who contributed 1-4, blasted a superb goal into the roof of the net seconds after Armagh dangerman Stevie McDonnell's shot had been saved by Danny Devlin when a goal would have cut the deficit to a single point.
Derry, who lost by one point to Armagh when they were last in the final in 2000, will face either Donegal or holders Tyrone in the decider on 17 July.
The opening exchanges were fairly even with McDonnell (3), Aaron Kernan, Michael O'Rourke and Jamie Clarke getting points for Armagh. Clarke's effort was a classy left-foot finish from an almost impossible angle.
Apart from Bradley and Gilligan, Lynch got Derry's other two points before the break.
O'Rourke's goal came within 20 seconds of the restart. Charlie Vernon won the breaking ball and it was quickly worked forward via Billy Joe Padden and McDonnell for O'Rourke to shoot past Devlin.
Charlie Kielt's point from play and a Gilligan free dented hopes of a meaningful Armagh revival.
McDonnell and Gilligan exhanged frees before Bradley's goal made it 2-11 to 1-7.
Derry finished in style with Gilligan netting a superb goal as well as two frees, and Sean Leo McGoldrick also getting a point.
Armagh captain McDonnell ended with a match tally of six points while Paul Duffy and Vernon also scored in the second period.
Armagh: Hearty, A Mallon, Donaghy, Dyas; A Kernan, McKeever, Martin; Toner, Vernon; T Kernan, Padden, Mackin; M O'Rourke, McDonnell, J Clarke
Derry: Devlin; S L McGoldrick, K McGuckin, McBride; McAlary, C Kielt, Bateson; Diver, Friel; Lynch, J Kielt, B McGoldrick; Muldoon, Bradley, Gilligan