Dagenham & Redbridge suffered penalty heartache as their Wembley dreams were shattered in the FA Trophy quarter-finals.

Daryl McMahon's men looked set for a semi-final spot, only to concede a penalty from the last kick of the 90 minutes.

That meant a shoot-out and National League North York came out on top 7-6 to join Wrexham, Stockport County and Bromley in the last four.

McMahon made two changes from the midweek win at Yeovil, as Matt Robinson and captain Angelo Balanta came in for Josh Hare and Brandon Comley.

And after a lively opening few minutes, Daggers saw Mo Sagaf's shot deflected behind for the first corner of the tie on 10 minutes, with Peter Jameson missing Will Wright's delivery and Akil Wright putting the ball over his own crossbar.

Dean Rance needed treatment after colliding with a post and was then booked for returning to the pitch without the referee's permission as York looked to counter from their second corner.

But Daggers opened the scoring on 15 minutes when Balanta found birthday boy Myles Weston on the left and his cross was helped goalwards by Paul McCallum, with Matt Brown possibly getting the final touch into his own net.

Barking and Dagenham Post: Paul McCallum celebrates as Dagenham & Redbridge score against York CityPaul McCallum celebrates as Dagenham & Redbridge score against York City (Image: ©TGS Photo tgsphoto.co.uk +44 1376 553468)

Buoyed by their lead, the hosts looked to dictate play through Weston, Balanta and Robinson, with Wright almost picking Junior Morias with a through ball.

Barking and Dagenham Post: Paul McCallum celebrates with team mates after scoring for Dagenham & Redbridge against York CityPaul McCallum celebrates with team mates after scoring for Dagenham & Redbridge against York City (Image: ©TGS Photo tgsphoto.co.uk +44 1376 553468)

Rance then won the ball back to launch a counter-attack for Balanta, who combined with Sagaf but could not get into the box.

Wright's free-kick on the half-hour mark was gathered by Jameson after evading a host of red shirts in the box, before York won their first corner of the afternoon on 38 minutes, following a poor pass by Rance.

Barking and Dagenham Post: Mohammed Sagaf of Dagenham & Redbridge and Kurt Willoughby of York battle for the ballMohammed Sagaf of Dagenham & Redbridge and Kurt Willoughby of York battle for the ball (Image: ©TGS Photo tgsphoto.co.uk +44 1376 553468)

But Olly Dyson's delivery was poor, to the frustration of the visiting fans, and Mitch Hancox was booked for a foul on Balanta.

Kurt Willoughby had a great chance to level just before the break when Michael Duckworth picked him out from the right, but his far-post header missed the target.

Barking and Dagenham Post: Dagenham & Redbridge's Paul McCallum (left) and Angelo Balanta (right) in action against York CityDagenham & Redbridge's Paul McCallum (left) and Angelo Balanta (right) in action against York City (Image: ©TGS Photo tgsphoto.co.uk +44 1376 553468)

And York went close again soon after the restart when Scott Barrow sent his 20-yard effort just wide of the mark.

McCallum knocked down a Weston cross for Morias, who sliced over, before Rance made way for Comley in the first change of the day.

Barking and Dagenham Post: Matt Robinson of Dagenham & Redbridge and Michael Woods of York City battle for the ballMatt Robinson of Dagenham & Redbridge and Michael Woods of York City battle for the ball (Image: ©TGS Photo tgsphoto.co.uk +44 1376 553468)

And Balanta had a great chance to double the lead on 54 minutes, going through after a brave header but firing straight at Jameson.

But York, having made a bright start to the second half, sent a header wide when a corner was only half-cleared just before the hour mark.

Barking and Dagenham Post: Kurt Willoughby of York City holds off Will Wright of Dagenham & RedbridgeKurt Willoughby of York City holds off Will Wright of Dagenham & Redbridge (Image: ©TGS Photo tgsphoto.co.uk +44 1376 553468)

Wright's free-kick, given for a foul on Robinson, was headed behind by a York defender midway through the half, with McCallum wide of the mark from the resulting delivery.

But York had a great chance to get back on terms on 71 minutes as the ball fell kindly for Willougby, only for Comley to come to the rescue with a timely challenge.

Barking and Dagenham Post: Myles Weston of Dagenham & Redbridge and Olly Dyson of York City battle for the ballMyles Weston of Dagenham & Redbridge and Olly Dyson of York City battle for the ball (Image: ©TGS Photo tgsphoto.co.uk +44 1376 553468)

It gave the visitors a boost and Patrick McLaughlin's shot was headed over by Callum Reynolds for a corner moments later, before Dyson's delivery was comfortably gathered by Elliot Justham.

Balanta made way for Yoan Zouma for the last quarter of an hour and Weston found Morias inside the box, but his quick shot flew over the crossbar.

Barking and Dagenham Post: Elliot Johnson of Dagenham & Redbridge and Clayton Donaldson of York City battle for the ballElliot Johnson of Dagenham & Redbridge and Clayton Donaldson of York City battle for the ball (Image: ©TGS Photo tgsphoto.co.uk +44 1376 553468)

Morias was replaced by Josh Walker in McMahon's third change, with Weston firing wide after McCallum had pounced on a poor touch from Duckworth.

And York pushed defender Brown forward for the six minutes of injury time, with his header from Duckworth's cross lacking power and saved by Justham.

Barking and Dagenham Post: York City's Michael Woods and Angelo Balanta of Dagenham & Redbridge battle for the ballYork City's Michael Woods and Angelo Balanta of Dagenham & Redbridge battle for the ball (Image: ©TGS Photo tgsphoto.co.uk +44 1376 553468)

Brown was then fouled midway inside the home half, giving York a last-gasp chance, and a foul on Maxim Kouogun saw the visitors awarded a penalty, which Clayton Donaldson converted with a 'Panenka' to deny Daggers and set up a shoot-out.

McLaughlin stepped up first and sent Justham the wrong way, finding the bottom corner, with Weston firing into the top corner to level.

Willoughby kept his cool to convert for York, before Reynolds saw his spot-kick well saved by Jameson to give York the upper hand.

Justham guessed the right way to deny Hancox with the next effort, though, and Wright levelled matters to put pressure on substitute Remy Longden, who fired against the crossbar.

In-form McCallum sent Jameson the wrong way, but Donaldson beat Justham for a second time and Walker saw his effort saved to send the shoot-out into sudden death.

Barrow fired York 4-3 up, but Robinson found the corner in reply and Brown had enough power on his effort to find the net via a post.

Sagaf sent Jameson the wrong way to make it 5-5, piling pressure on Kouogun, who found the roof of the net, and Comley sent his effort down the middle for 6-6.

Wright then put York back in front and Jameson saved from Elliot Johnson to complete the upset and shatter Daggers.

Dagenham & Redbridge: Justham, Wright, Reynolds, Johnson, Sagaf, Rance (Comley 52), Robinson, Weston, Balanta (Zouma 75), McCallum, Morias (Walker 78). Unused subs: Lawlor, Clark, Scott, Akanbi.

Attendance: 2,417 (including 848 York City fans).