Portsmouth beat Sunderland on penalties to win the Checkatrade Trophy following a compelling 2-2 draw in front of a competition-record crowd of 85,021 at Wembley.
Sunderland midfielder Lee Cattermole was the only player not to convert from 12 yards in the shootout as Craig MacGillivray saved to his left.
It finished 1-1 after 90 minutes as Nathan Thompson's header cancelled out an Aiden McGeady free-kick.
Jamal Lowe's exquisite lob over Jon McLaughlin looked to have won it late in extra-time for Pompey, only for McGeady to pounce again in the 119th minute to take the game to a shootout.
Oli Hawkins struck the decisive spot-kick as Portsmouth won 5-4 on penalties.
Both sides were roared on by a raucous crowd in what was the largest attended match of the weekend in the UK, and the occasion was accompanied by an energetic performance to match it on the pitch.
Sunderland deservedly led at the break thanks to McGeady, although the Republic of Ireland international's free-kick took a slight deflection off the shoulder of Pompey centre-back Matt Clarke and into the top corner.
But Portsmouth were transformed after the interval and dominated the second half.
Brett Pitman struck the base of the post with a half-volley, before full-back Thompson arrived at the back post with eight minutes left to head in Gareth Evans' cross.
A tense period of extra-time followed and, with five minutes to play, Lowe looked to have won the final with a majestic finish.
The winger, who grew up close to Wembley in nearby Harrow and who had been plying his trade for Hampton & Richmond in National League South just three seasons ago, picked up Clarke's through ball before evading Jack Baldwin and lifting the ball expertly into the net from the edge of the box.
But there was to be more drama.
Clarke was unable to race back in time to his own line as McGeady's neat footwork in the box allowed him to slot in an equaliser to take it to penalties.
Cattermole, the only surviving Sunderland player from the club's previous Wembley appearance in the 2014 League Cup final, was the only player not to score from the spot, allowing Hawkins to net the decider.
Record numbers descend on Wembley
The match-up of two former Premier League clubs was a dream scenario for the sometimes maligned competition's organisers, as just more than 85,000 headed through the Wembley turnstiles.
Only Barcelona's 2-0 win against city neighbours Espanyol in the Spanish top flight on Saturday drew a larger crowd across Europe this weekend, with 92,795 in attendance at the Nou Camp.
With both sides also jostling for promotion at the top of League One, Pompey and the Black Cats could return to face each other in a play-off final at the end of May.
This crowd easily surpassed the previous competition record of 80,841 when Wolves beat Burnley in 1988, and also set a record for the competition at the new Wembley Stadium, surpassing the 74,434 who watched Coventry beat Oxford in 2017.
Portsmouth's victory gave manager Kenny Jackett his second success in the competition, after he led Swansea to victory in 2006.
'We showed resolve' - reaction
Portsmouth manager Kenny Jackett:
"I thought Sunderland deserved the lead at half-time and they were the better side up to 45 minutes.
"But we came back well and dominated the second half and the majority of extra-time and I do feel we deserved to win it overall.
"I'm delighted with the players' resolve to comeback in the course of the game, but also to take five fantastic penalties.
"A great save from our goalkeeper has won the game in the end."
Sunderland manager Jack Ross:
"The first half was really good and to play in that manner on such an occasion was terrific. In hindsight, we probably needed a bit more to kill the game off against a spirited Portsmouth side.
"Extra-time becomes about character and heart after the spell of pressure we had to withstand in the second half. I thought we had weathered the bulk of that storm, but credit to Portsmouth - they came back into it.
"It's a sore changing room at the moment and there's no words I can say immediately after to the players to try to help deal with that.
"But we'll allow the pain to subside and get back to work tomorrow and prepare for Accrington next up in the league."
- 33CloseSubstituted forWalkesat 113'minutes
- 10LoweBooked at 116mins
- 11CurtisBooked at 32minsSubstituted forEvansat 56'minutesBooked at 102mins
- 22BogleSubstituted forHawkinsat 69'minutes
- 15BaldwinBooked at 80mins
- 16JamesSubstituted forHumeat 88'minutes
- 23LeadbitterSubstituted forWykeat 95'minutes
- 17MorganSubstituted forGoochat 73'minutes
- 19McGeadyBooked at 90mins
- 22GriggSubstituted forPowerat 77'minutes
- Dean Whitestone
- Shots on Target