Bradford Park Avenue handed Harrogate Town a second defeat in the space of a month to retain the West Riding County Cup 3-2 at Valley Parade.
Lamin Colley fired Bradford ahead after Richard Marshall had seen an earlier penalty saved by Tom Stewart.
Rees Webb-Foster doubled the Bradford lead before Marcus Day gave a much-changed Town line-up a lifeline with a powerful header in the 86th minute.
Bradford looked to have sealed victory when Marshall slotted home his second penalty attempt of the evening in injury time.
And despite Joe Colbeck smashing home the third penalty of the game just a minute later, Park Avenue kept the lead and captured the trophy for a second consecutive season.
For Town boss Simon Weaver, it was the second time in three years his side had lost the County Cup final at Valley Parade - following the shock 1-0 loss to Eccleshill in 2014.
But this time, his priorities lie firmly elsewhere as he looks to take the club into the National League Premier for a first time.
As promised, Simon Weaver sent a young side out at Valley Parade. Under 21 players Lewis Riley, Marcus Day and Rob Worrall handed opportunities to impress on the big stage alongside established players Andy Gascoigne, Jordan Thewlis and loanee Mason Warren.
In defence, Luke Shiels made a return from knee surgery in January to partner Luke Foster, who has largely featured on the Town bench since signing from Southport.
The much-changed Town line-up possibly contributed to a low-key opening half an hour, where Weaver’s men rarely threatened and Avenue relied on pot-shots from distance.
Bradford did force the only opening of that period when Webb-Foster and Dylan Mottley-Henry combined well in the right channel and the latter had a shot blocked by Tom Stewart in the Town goal.
The clash sprung to life just after the half hour when referee Ken Hayock gave Park Avenue a spotkick after Shiels hauled down ex-Harrogate Railway striker Colley from an innocuous cross. However, the scores remained unchanged as Stewart dived low to his right to save Richard Marshall’s weak effort.
Bradford were the more dangerous side and Stewart almost went from hero to zero in the space of five minutes as he raced out of his goal and a mix-up with Shiels handed a goalscoring opportunity seemingly on a plate to Colley. However, Shiels recovered and bundled the ball to safety.
Colley eventually made the breakthrough on 36 minutes as he escaped the attentions of Foster and cooly slotted under Stewart.
Webb-Foster could have doubled the lead moments later as he dragged wide, while Rob Worrall’s deep free-kick was Town’s only effort on goal throughout the first half as Ryan Jones tipped it behind.
Town started the second half in lively fashion and Warren’s volleyed cross caused Jones to concede a corner before Gascoigne, who was later booked for diving, shot over.
But their forward momentum was blunted when Rob Worrall conceded a free-kick on the edge of the box and Webb-Foster bent the following set-piece round the wall and into the bottom corner.
Weaver threw on the experience of Paul Clayton and Joe Colbeck in an attempt to force a way back into it and the former set up their best chance of the evening with 15 minutes left.
The former England C international dribbled round two defenders before laying across to youngster Day, who skewed horribly over.
The late drama unfolded when a second penalty of the evening was awarded to the home city club from a foul by Ryan Fallowfield and Marshall made no mistake at the second time of asking from 12 yards.
Town went directly up the other end and with Clayton fouled, Colbeck was given a chance to add respectability to the score against his former club and he did it with a powerful finish.