Two-goal Peter MacDonald came off the bench to fire Dundee into the Ramsdens Cup third round with a 3-1 win over Forfar.
Dundee midfielder Jim McAlister tested Rab Douglas with a 25-yard effort early on but his former team-mate was up to the challenge and pushed the shot wide.
Forfar took the lead after 52 minutes when Iain Campbell's cross was headed home at the back post by Stuart Malcolm.
Dundee got back into the tie 10 minutes from time with a helping hand from Douglas, who let Kevin McBride's shot slip through his grasp.
The Dee had to wait until extra-time to see off League One Forfar, MacDonald curling a right-footed free-kick beyond Douglas and then striking on the break.