Warren Burrell produced a superb individual goal in the 88th minute to seal a first Harrogate Town win at Bradford Park Avenue since 2005.
It looked as if Town’s Horsfall Stadium hoodoo would continue as a two goal first half lead was surrendered in the second half.
Luke Shiels and JP Pittman struck within four first half minutes of each other, both from Joe Leesley assists to put the visitors in a commanding position.
It could have been game over on the stroke of half time as Simon Weaver’s men were awarded a spot kick, only for Dan Eccles to keep out Chib Chilaka’s effort.
Alex Meechan’s men looked a different side after the restart, and were given hope of a comeback when Luke Dean found the net from the edge of the area 12 minutes into the half.
Dean then produced an even better finish in the 66th minute that looked to have earnt the hosts a point only for Burrell to produce a moment of magic in the final stages and send Town home with three points.
Weaver made one change from Tuesday night’s win at Gainsborough Trinity with Tom Platt replacing the suspended Lloyd Kerry, while Summer signing Wayne Brooksby was a late addition to the bench.
Despite a positive start from the hosts, Town created the first opening after eight minutes as Joe Leesley struck Lewis Turner’s cross first time into the hands of Dan Eccles.
Luke Shiels then found the net for the third time this season to give Town a 13 minute lead after Leesley had played a clever one-two with Chib Chilaka on the edge of the box before floating onto the head of the centre half.
Three minutes later and Town doubled their lead with Leesley turning provider yet again, picking up possession in midfield and playing through Pittman who struck low across goal to match the tally of his teammate Shiels.
Leesley produced another fine delivery after half an hour that Simon Ainge threw himself at to head home, though Town were denied a third as Ainge looked up to see the linesman’s flag raised for offside.
With ten minutes left of the half, Pittman went close to netting a second after Ben Parker’s clearance had blown towards the striker, only for the headed lob attempt to end up over the bar.
BPA created an opening of their own towards the end of the half, but Chris Sharp’s improvised finish was blocked, just moments before Chilaka struck a thunderous effort wide of the far post following Pittman’s flick.
In the final minute of the half Jack Emmett’s right wing cross was met by Leesley, only for the winger to be taken out by Eccles prompting referee Paul Newhouse to point to the spot.
Chilaka stepped up to take the kick and took aim for the bottom right corner, but was denied a goal on his return to Horsfall Stadium by Eccles’ impressive save.
Much like the first 45, Meechan’s men started well, but struggled to test Peter Crook in the Town goal despite a couple of early testing crosses.
12 minutes after the break the home side found the goal their start to the half had deserved after a ball into the box was cleared to the edge of the area only for Dean to despatch first time into the bottom left corner.
Bradford continued their early momentum and levelled the tie on 66 minutes when Dean produced another fine finish to cushion a pull back from the left wing into the top right corner with Crook beaten all ends up.
With the scores now level the next opportunity fell to the hosts’ Liam Dickinson, though the striker couldn’t keep his header from McKenna’s corner down.
Dickinson again tested Crook in the 86th minute, but it was two minutes later when Town midfielder Burrell produced a moment of magic to seal the three points.
The number four attacked the Bradford penalty area from the left before curling into the top left corner to win a well contested Yorkshire derby.
Harrogate Town: Crook, Turner, Parker, Burrell, Ainge, Shiels, Platt, Leesley, Chilaka (Colbeck 71), Pittman, Emmett (Day 80)
Subs not used: Ellis, Brooksby, Stewart
Goals: Shiels 13, Pittman 16, Burrell 88
Bradford Park Avenue: Eccles, Toulson, Davie, Dean, Killock (Coates 28), Hill, McKenna, Wroe, Sharp (Ryan 70), Dickinson, Osborne (McWilliams 57)
Subs not used: Payne, Boshell
Goals: Dean 57, 66
Booked: Dean, Dickinson
Referee: P Newhouse