Rory Morrin's 57th-minute goal proved the decisive score as Mayo edged Dublin by two points in a thrilling Electric Ireland All-Ireland Minor Football Championship quarter-final at Pearse Park on Saturday afternoon.
Mayo looked the more assured outfit from the first whistle, taking the lead in the fourth minute through Ciaran Mylett, with Dublin levelling matters soon after through Dara Fagan.
However, their opponents were dominating on the restarts, with Dylan Thornton to the fore, and they put daylight between the teams as Paul Walsh cut inside far too easily from the right flank before firing a precise finish past Hugh O'Sullivan from 10 yards.
Dublin were not as clinical with the two goal chances that came their way during the half; Luke Swan shooting wide in the 12th minute, while Fionn Murray fired too close to Mayo goalkeeper Luke Jennings.
After Thornton added a superb solo point, Mayo pushed seven points clear by the end of the first quarter as Mylett was quickest to react as he palmed home after Ethan Henry's speculative shot had rebounded off the upright.
Leading by 2-8 to 0-8 at the break, Mayo pushed on through a superb Henry goal in the 34th minute and another wonder strike from centre-back Ruairí Keane reinforced their supremacy in the contest.
However, two goals in quick succession from Luke Curran and Alex Rogers looked to have spared Dublin before Morrin popped up with a calm finish to settle the contest.