Mayo's attempt to win the All-Ireland Football Championship for the first time since 1951 ended in disappointment as Dublin won by a point at Croke Park.
Bernard Brogan scored two goals and three points as Jim Gavin's Dubs secured the Sam Maguire trophy for the second time in three years.
Mayo had made the better start and led until Brogan flicked in his first goal in the 16th minute.
Andy Moran got Mayo's goal but they fell agonisingly short, 2-12 to 1-14.
Dublin, having won the Football League earlier in the year, have completed a double by becoming champions for the 24th time in their history.
Mayo, who had lost five finals during a long 62-year wait for All-Ireland glory, were fancied by many as they had knocked out holders Donegal emphatically in the quarter-finals.
Their hunger was apparent as skipper Moran, Lee Keegan, Keith Higgins and Cillian O'Connor scored to put them 0-4 to 0-1 up.
Brogan's first goal - which saw him cleverly flick the ball over defender Ger Cafferky and advancing keeper Robert Hennelly - brought Dublin level.
Mayo led 0-8 to 1-4 at the break but Dublin had a good spell on the restart during which Cian O'Sullivan and Eoghan O'Gara scored to edge them ahead.
Moran's low shot into an empty net put the game in the balance again but, when Brogan netted from substitute Denis Bastick's pass, Dublin were 2-9 to 1-9 up.
Points were exchanged and Mayo had cut the gap to just two with the game deep in stoppage-time.
Mayo, needing a goal, then won a free in a good position but O'Connor opted to clip over for the point.
It was the wrong decision as the corner-forward's seventh point of the afternoon was the last kick of the match and the Dubs won by a point.