Croke Park was bathed in blue as Stephen Cluxton ascended the steps of the Hogan Stand to become the first captain in the 133-year history of the GAA to accept the Sam Maguire Cup four times.
Dean Rock pointed a free in the seventh minute of injury time after James McCarthy had caught a David Clarke kickout and Diarmuid Connolly was fouled on the Cusack Stand side. And Mayo didn't get another chance after an absorbing contest.
It was a heart-breaking defeat for Mayo – the third time they had lost by a single point to Dublin in an All-Ireland decider.
They will rue a late free from Cillian O'Connor which struck the upright but credit Dublin who came from two points behind with eight minutes of normal time remaining to eke out a historic win.
So many new records were set on this most historic afternoon for a magnificent bunch of players and under a brilliant leader, Jim Gavin, who now joins a corps d'elite of football bosses who have won four or more All-Ireland titles. Mick O'Dwyer (8) and Sean Boylan (4) are the only other members.
This team, which has now won 28 of the 31 championship games they have played under Gavin, becomes the tenth in history to secure the coveted hat-trick of All-Ireland wins.
While they're the fourth Dublin side to achieve the three-in-a-row, the other hat-tricks were fashioned in 1897-'99, 1906-'8 – when club teams participated in the All-Ireland series – and 1921-'23. Statistically they are the greatest Dublin team of all time.
But for the loss to Donegal in the 2014 All-Ireland semi-final, they won now have won five All-Ireland titles in a row.
Given the age profile of the team and their utterly dominance of this year's championship, they are ideally positioned to challenge for that honour; which eluded the great Kerry team even though they won eight titles in 12 seasons – Dublin have won five in seven.
On a personal level it ended a remarkable season for the team's youngest player, Con O'Callaghan. In the space of seven months, the 21-year-old Cuala native has won an All-Ireland SFC medal; an All-Ireland U-21 medal and an All-Ireland club hurling championship medal – the first ever to achieve that accolade in the same year.
Dublin: S Cluxton; P McMahon, C O'Sullivan, M Fitzsimons; J Cooper, J Small (0-1), J McCaffrey; B Fenton (0-1), J McCarthy (0-2); C Kilkenny, C O'Callaghan (1-0), P Mannion (0-3),P Andrews, E O'Gara (0-1), D Rock (0-7, 2f). Subs: P Flynn for J McCaffrey 8m; D Connolly (0-1) for Andrews ht; K McManamon (0-1) for O'Gara ht; B Brogan for Flynn 65m; N Scully for O'Callaghan 69m, C Costello for Mannion 74m.