Formartine manager Kris Hunter was frustrated his side let a two-goal lead slip as Banks o’ Dee rallied to earn a replay.
An own goal from Paul Lawson and Jamie Lennox’s late penalty earned the Aberdeen junior side another go at North Lodge Park on Saturday.
Derek Young had given Formartine a 30th-minute lead, shortly before the former Aberdeen player and Dee’s Kane Winton were sent off for an off-the-ball incident.
Scott Barbour doubled the Highland League team’s advantage early in the second half, but they were then made to pay for allowing the hosts back into the game.
Hunter said: “If we don’t do the basics right then we get punished and we did. They weren’t in the game and got two goals out of nothing.
“They got back in the game because of our sloppiness. Our decision-making for their two goals was pretty poor. But we are still in the cup and that is the main positive for us to take ahead of the replay.”
Formartine were close to taking an early lead when the Dee defence failed to clear a corner and Stuart Anderson’s hooked effort bounced off a post on its way wide.
The visitors lost Garry Wood to a foot injury in the 16th minute. His replacement, Young, was to have a brief but eventful appearance.
Shortly after his introduction the substitute was cautioned for catching Winton with a high boot as the pair challenged for the ball.
Young then gave his side the lead on the half-hour mark, when he placed a shot into the net following a low cross from Scott Ferries and lay-off by Barbour.
A minute later, both sides were reduced to 10 men.
Winton appeared to catch Young late just after the Formartine midfielder had played a pass. The former Don reacted furiously and both players ended up tussling on the floor before being sent off.
Hunter said of Young: “He has a lot of experience and shouldn’t have reacted like that. It is part and parcel of football, somebody putting a tackle in.”
The away side extended the advantage in the 52nd minute.
Ferries was again the architect as his low cross broke to Barbour and the forward placed a shot past goalkeeper Andy Shearer.
However, Dee were handed a lifeline just after the hour mark as Lawson attempted to head the ball out for a corner, but instead directed it into the top corner of the Formartine net.
The hosts were then awarded a penalty in the 84th minute after Aiden Sopel tried to get on the end of a long pass forward.
Formartine goalkeeper Andy Reid and defender Calum Dingwall attempted to deal with the danger, but they were caught in a collision with the Dee substitute. A spot kick was awarded and Lennox confidently converted his effort from 12 yards out.
Banks o’ Dee co-manager Sandy McNaughton is delighted his side is still in the cup and said: “We are really happy with the result and are looking forward to the replay.
“It’s a great journey for us. We have enjoyed our cup games so far and we are still alive. Who knows? Anything can happen in the next game. They should be wiping the floor with us. But we have a good bunch of players who play to a system they are happy with.”