Dublin underlined their class with an astonishing second-half comeback to beat Cork 2-20 to 2-13 and seal an Allianz Football League final date with Derry.

The Dubs overcame an eight-point half-time deficit to win comfortably in the end, with veteran Alan Brogan to the fore.

Cork had rocked the reigning League and All-Ireland champions with an early two goal-blitz, Colm O’Neill and Mark Collins putting the Rebels 2-2 to 0-1 up after just seven minutes.

With six minutes on the clock, Paul Kerrigan fed O’Neill, who thumped a rising shot past Stephen Cluxton into the roof of the net.

Within a minute, Cork had a second goal. Cluxton completely missed Brian Hurley’s high ball and it ricocheted off the inrushing Collins and over the line.

Centre-forward Hurley was in imperious form, scoring points from left boot, right boot and fist as Cork pulled clear.

Dublin were strangely muted, the usually deadly accurate Diarmuid Connolly missing an easy free and shanking a goal chance wide.

Paddy Andrews and Eoghan O’Gara, an early sub for Jason Whelan, put up some resistance for Dublin, but Cork looked to be cruising to victory with a commanding 2-9 to 0-7 interval lead.

However, Dublin stormed back in the second half, led by the wily Alan Brogan, O’Gara and fellow sub Bernard Brogan, as Cork wilted in the face of their relentless attacking pressure.

Cork began the second half in the same fashion as the first with points from Jamie O’Sullivan and Daniel Goulding but Dublin had a platform on 39 minutes when Philly McMahon’s shot hit the post and Michael Darragh Macauley reacted quickest to tuck the ball away.

Goulding hit back with - remarkably - the first pointed free of the afternoon to restore Cork’s eight-point lead but the Rebels only managed one more score as Jonny Cooper marked Hurley out of the game.

Dublin raised the tempo, with Alan Brogan pulling the strings and O’Gara finding gaps, and substitute Bernard Brogan rattled over a succession of frees conceded by a creaking Cork rearguard.

By the 51st minute the lead was down to four, 2-12 to 1-11 but a wonderful save from goalkeeper Ken O’Halloran, who tipped Andrews’ vicious shot over the bar, only postponed the inevitable.

O’Gara, Bernard Brogan, Cooper, Macauley, sub Darragh Nelson and Alan Brogan all added points as the blue juggernaut swept into the lead.

James Loughrey’s 64th-minute foul on Bernard Brogan looked outside the square but referee Ciaran Branagan gave the penalty and when Connolly sent O’Halloran the wrong way a remarkable fightback was complete.

Dublin: S Cluxton; J Cooper (0-01), R O'Carroll, P McMahon; J McCarthy, N Devereux, K Nolan; MD Macauley (1-01), D O’Mahony; J Whelan, A Brogan (0-01), D Connolly (1-02, 1-0 pen, 1f); K McManamon (0-01), P Flynn (0-02), P Andrews (0-03).

Subs: E O’Gara (0-02) for Whelan (26), D Byrne (0-01) for O’Mahony (35), B Brogan (0-04, 3f) for McManamon (44), D Nelson (0-01) for Nolan (57), C Reddin (0-01) for Andrews (66), T O’Brady for O’Gara (68). 

Cork: K O’Halloran; M Shields, J O’Sullivan (0-01), T Clancy; J Loughrey, P Kelly (0-01), D Cahalane; F Goold (0-01), A O’Sullivan; M Collins (1-00), D O’Connor (0-01), P Kerrigan (0-01); D Goulding (0-2, 1f), B Hurley (0-05), C O’Neill (1-01).

Subs: J O’Rourke for O’Connor (44), A Walsh for Goulding (49), J Hayes for O’Neill (56), N Galvin for Clancy (60), T Clancy for A O’Sullivan (62), K O’Driscoll for Kerrigan (68).

Referee: C Branagan (Down)