Wrexham were defeated 4-3 on penalties by Bradford City in the Carabao Cup second round tie at The Racecourse.
Phil Parkinson’s side advanced to the next round after defeating Wigan Athletic on penalties in the previous round, but it was the Bantams who held their nerve from the spot to advance.
Wrexham came from behind to draw 1-1 after 90 minutes to advance to the third round of the competition for the first time since the 1981-82 season.
A controversial early penalty put Bradford ahead but Wrexham, who had chances to equalise in the first half, got back on level terms after the break when centre-back Will Boyle rose highest to head home a corner for his second Reds goal.
That meant a shoot-out was needed and although Luke Young missed the first penalty, Elliot Lee, Ollie Palmer and James McClean converted theirs.
When Bradford’s Ben Oyegoke had his effort saved by Mark Howard, James Jones needed to score to take it to sudden death but the midfielder was thwarted by Harry Lewis and Bradford are into the hat for round three.
Parkinson made five changes from the side that started Saturday’s 1-1 draw at Barrow in League Two.
Aaron Hayden made his first start of the season after returning from injury, and he was joined in the team by Ryan Barnett, Andy Cannon, Jones, and Sam Dalby.
The quintet replaced Anthony Forde, Eoghan O’Connell, Tom O’Connor, Lee, and Palmer, who were all listed as substitutes.
Fit-again wide receiver McClean was also on the bench.
Bradford were awarded a controversial penalty after only 90 seconds.
Hayden appeared to have outmuscled Jamie Walker in the area and won cleanly, but referee Ben Speedie felt the Bantams man had been pushed over and Tyler Smith converted his penalty.
Howard made a good save to deny Smith who got in behind the Wrexham defence while the Reds’ first attempt on goal came from Young who fired over the bar after a good run by Jacob Mendy.
Wrexham enjoyed a good spell as they responded well to the early setback but Cannon couldn’t keep his shot down when Young’s free-kick fell to him in the box and Jake Bickerstaff progressed into the area but his low effort fell narrowly wide.
It then went a bit flat as both sides cancelled each other out but Wrexham went on to finish the first half strongly.
Barnett whipped in a cross which was parried by goalkeeper Lewis with a defender beating Mendy to the loose ball and from the resulting corner taken by Young, Ben Tozer’s header was deflected onto the top of the cross bar.
That meant another corner and Dalby’s header was cleared off the line.
It was much better from Wrexham and another chance arrived but Bickerstaff’s low drive fell just wide.
Wrexham had a scare when a poor header from Hayden allowed Bradford in, but goalkeeper Howard came to the rescue with a smart block, and the score remained 1-0 at the break.
Howard was called upon early in the second half and made a good save to deny Brad Halliday.
Mendy attempted to shepherd the ball out of play but lost possession, and the ball was played to Emmanuel Osadebe, who fired just over the bar.
Bradford came close once more as Halliday raced clear, but he fired wide with only Howard to beat.
Wrexham’s next goal was crucial, coming in the 72nd minute.
Young sent in a corner and Will Boyle headed home the equaliser.
Wrexham continued to go at Bradford and Jones volleyed wide while Palmer could not keep a volley down of his own after Lee launched a cross in the danger-zone.
Bradford weren’t done and former Wrexham loanee Matt Darbyshire broke the offside trap and saw a shot deflected wide for a corner from which the striker’s header was saved by Howard.
But there was a chance for Wrexham following a scramble in the box as Jones headed straight at Lewis, and the game had to be decided on penalties where
Wrexham (5-3-2): Howard; Barnett, Hayden (O’Connell 61), Tozer, Boyle, Mendy (McClean 61); Jones, Young, Cannon (Lee 61; Dalby (Walters 87), Bickerstaff (Palmer 70). Subs: McNicholas, Forde, O’Connor, McAlinden.
Bradford City (5-3-1-1): Lewis; Halliday, Platt, Stubbs,, Kelly, Ridehalgh; Osadebe (Oyegoke 72), Smallwood, Pattison (Pointon 46); Walker (Wilson 83); Smith (Derbyshire 72). Subs not used: Doyle, Hendrie, Odusina, Youmbi, Richards.
Attendance: 9,,816 (1,010 from Bradford).