A Ciarán Kilkenny point two minutes from time saw Dublin eek out victory in Sunday's Bord na Móna O'Byrne Cup Round 1 clash at Cusack Park, Mullingar.
The introduction of the evergreen Dessie Dolan for the midlanders looked like it could be the home side's day when he slotted two points shortly after his introduction midway into the second half but the Dubs rallied at the finish to edge out their hosts.
Dublin led 0-6 to 0-5 at half-time with Paul Hudson's (pictured) point just before the break affording them the half-time advantage.
Points from sub Eoin Fanning and Conor Walsh on the restart stretched Dublin's lead but Westmeath battled back with points from Jamie Gonoud, Lorcan Smyth and Alan Giles contributed to them edging in front with 15 minutes remaining.
Dolan's brace of points came either side of a fine Harry Dawson point to set up a tight finish with scores from Eric Lowndes and Kilkenny giving the Dubs the final word.
Dublin face Louth next this Wednesday night in Parnell Park in Round 2 of the O'Byrne Cup (7.45)
SCORERS - Dublin: P Hudson 0-4 (0-3f), J Whelan, C Kilkenny 0-2 each, E Fanning, C Walsh, H Dawson, E Lowndes 0-1 each. Westmeath: A Giles 0-3 (0-3f), P Sharry (0-2f), Dessie Dolan 0-2 each, D Duffy, C McCormack, J Gonoud, L Smyth 0-1 each.
DUBLIN: S Cluxton; D Nelson, S George, M Fitzsimons; E Lowndes, D Daly, K Nolan; D O'Mahony, S Carthy; C Walsh, H Dawson, J Whelan; P Hudson, C Kilkenny, P Ryan. Subs: E Fanning for Ryan (ht), J Cooper for George (55), C Guckian for Nolan (55), C Mullins for O'Mahony (58).
WESTMEATH: D Quinn; S Gilmore, S Flynn, Damien Dolan; J Egan, J Gilligan, J Gonoud; D Duffy, D Corroon; L Smyth, G Hoey, P Sharry; K Daly, A Giles, C McCormack. Subs: T McDaniel for K Daly (46), Dessie Dolan for Giles (55), S Daly for Smyth (62), D Harte for Hoey (65).
REF: D Coldrick (Meath)