A stunning finale from 13-man Wexford, lit up by a stoppage time goal from Jack O'Connor, stole the Allianz Hurling League points for the Leinster champions at Croke Park.
Trailing by three points with eight minutes to go in a game low on inspiration up to then, and with a frustratingly high free count, Wexford eventually came good when it really counted with a late burst of scores.
They outscored Dublin by 1-5 to 0-2 in the closing minutes and O'Connor's 72nd minute goal was the decisive score that nudged Wexford within touching distance of the league quarter-finals.
The late blitz was doubly impressive from Wexford as they were reduced to 13 men following red cards for Conor McDonald and Shaun Murphy in the 54th and 67th minutes.
McDonald was shown a straight red for a pull across the body of Dublin corner-back Paddy Smyth while Murphy walked for two bookings. Dublin finished with 14 players as Eoghan O'Donnell was shown a second yellow card in the 70th minute.
In all, there were 13 yellow cards brandished by referee Johnny Murphy and three reds.
Dublin hit the interval with a 0-10 to 1-5 lead but of those 16 scores registered by the two teams, nine of them came from placed balls - summing up the stop-start nature of a scrappy game.
Six of Dublin's points in that period were converted frees with referee Murphy the most recognisable figure.
Oisin O'Rorke, Ronan Hayes and Paul Ryan all took turns on the frees for Dublin with Ryan drilling over four in the first-half.
Wexford managed just two points in the first 25 minutes and just one from play, a Paul Morris effort.
Their 31st minute goal came from a penalty when goalkeeper Mark Fanning reprised his Leinster final heroics of 2019 by striding forward and planting a meaty effort in the Dublin net.
Last summer's strike memorably helped Wexford overcome Kilkenny and tonight's put the Slaneysiders into the lead for the first time at 1-4 to 0-6.
Morris added a point to nudge Wexford two clear but Dublin's response was impressive as they closed out the half with four points in a row, including two from the impressive Rian McBride, to lead 0-10 to 1-5.
It continued in that vein initially with the first three points of the second-half all coming from frees.
Ryan took his tally to 0-8 for Dublin with yet another dispatched free in the 59th minute and Eamon Dillon hit a cracker from play to leave the hosts three clear, 0-16 to 1-10.
Things went downhill from there though for Mattie Kenny's men who, despite having the extra numbers personnel wise, were overwhelmed in the closing minutes as Wexford conjured a glut of scores and that crucial solo goal from Jack O'Connor to wrestle victory their way.
P Morris (0-7, 3 frees, 1 65), R O'Connor (0-4, 1 free), Jack O'Connor and M Fanning (pen) (1-0 each), L Chin (1 free), D O'Keeffe and P Foley (0-1 each).
P Ryan (0-8, 8 frees), R McBride and R Hayes (1 free) (0-2 each), O O'Rorke (1 free), C Crummey, D Burke, J Madden, E Dillon and C Boland (0-1 each).
M Fanning; Joe O'Connor, L Ryan, C Firman; D Reck, M O'Hanlon, S Murphy; A Rochford, D O'Keeffe; K Foley, L Chin, R O'Connor; P Morris, M Dwyer, A Nolan.
P Foley for K Foley (31-h/t, blood), P Foley for O'Hanlon (h/t), L Og McGovern for Rochford (h/t), Jack O'Connor for Chin (47), C McDonald for Dwyer (48), Cathal Dunbar for Nolan (69).
S Brennan; C O'Callaghan, Eoghan O'Donnell, P Smyth; J Madden, D Gray, J Malone; R McBride, S Moran; D Sutcliffe, C Crummey, D Burke; D Keogh, R Hayes, O O'Rorke.
P Ryan for O'Rorke (14), C Boland for Sutcliffe (43), E Dillon for Keogh (53), A Dunphy for O'Callaghan (58), T Connolly for Madden (62).
J Murphy (Limerick).