Scott Kashket’s injury-time goal salvaged Gillingham an FA Cup second-round replay against non-league Dagenham and Redbridge.
Josh Walker put Dagenham in front on 80 minutes when he seized on a pass from substitute George Saunders before slipping the ball into the bottom right corner.
But their joy turned to heartbreak when Kashket turned a cross from fellow substitute Jordan Green into the net from close range to the relief of the League Two strugglers.
The visitors created little in the way of meaningful chances and much of the action was played in the Gillingham half.
Junior Morias and Josh Walker both went close for the National League side before skipper Matt Robinson slammed his effort into the side netting following a corner just before the interval.
Gillingham improved in the second period and shots from Lewis Walker and Robbie McKenzie were thwarted by saves from home keeper Elliot Justham, but the trickery of Myles Weston and constant threat from Morias kept Daggers on the front foot until Kashket’s late intervention.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.