Newly-promoted Wrexham were cruelly denied a statement opening Championship win at Southampton as the hosts scored two late goals to give Will Still a hugely dramatic victory in his first game in charge.
Saints, relegated from the Premier League last season, trailed for the most of the game but equalised in the 90th minute as Ryan Manning curled in a beautiful 25-yard free-kick, before Jack Stephens bundled in the winner six minutes into injury time.
With six of their eight summer signings in the starting line-up, Wrexham had looked at home at this level and took a well-deserved lead when one of those recruits, Josh Windass, scored a penalty after Kieffer Moore was shoved over by Ronnie Edwards.
The visitors could have been further ahead as Windass hit the bar and Conor Coady and Lewis Brunt spurned excellent chances, while Jay Robinson hit the post for Saints.
There were several other opportunities at both ends in a breathless first half but the second was less frenetic as Southampton dominated possession and gradually took control of the game.
The introduction of Mateus Fernandes – one of many prized Southampton assets linked with a move away – helped the home side to build pressure, and Wrexham's resistance was finally broken when substitute Manning struck.
Saints kept pushing and Stephens fired in from Manning's low cross to spark delirious celebrations at a rocking St Mary's Stadium and give Still, the highly-rated 32-year-old former Lens head coach, a stunning start to life on the south coast.
As for Wrexham, this was yet another memorable episode for the Hollywood-owned club – even if they could not hold on for victory – as they look to build on their unprecedented three successive promotions.
Josh Windass was one of six debutants in Wrexham's starting line-up at Southampton
Just two years ago, Southampton were four divisions higher than Wrexham.
Saints ended their 2022-23 Premier League campaign with a 4-4 thriller against Liverpool, while Wrexham signed off from the National League by drawing 1-1 at Torquay United.
At a sold-out St Mary's, they met as equals thanks to Southampton's dire relegation last season and Wrexham's historic back-to-back-to-back promotions.
Both squads have undergone significant changes over summer, and there is likely more to come. Wrexham have the highest net spend in the Championship so far, while Southampton are still stacked with top-flight quality despite a number of notable departures.
Given the calibre of their opponents, it was impressive how quickly Wrexham's signings gelled.
But despite trailing for much of the match, this was Southampton's day.
Still's stated aim is to return this club to the Championship at the first attempt and, although he will hope to improve on this performance, the resolve his team showed bodes well for the long campaign ahead.
Ryan Manning joined Southampton in the summer of 2023
Wrexham's new signings all played their part in an excellent team performance, from Coady's timely interventions in defence to Lewis O'Brien's industry in midfield and Moore's astute hold-up play up front.
It was Windass who made the most telling contributions, though, always finding space in attack and using it intelligently, whether that was with a pass or a shot.
After clipping the crossbar with a curling effort from 20 yards and playing the pass to Moore which led to the penalty, Windass confidently converted his spot-kick to get the debut goal he deserved.
Southampton improved as the game wore on, and substitutes Fernandes and Manning had a big influence, most notably with the latter's brilliant equaliser and assist.
Saints goalkeeper Gavin Bazunu also warrants a mention for his vital save from Ryan Hardie when the hosts were still 1-0 down, just a couple of minutes before Manning scored.
Southampton visit League One side Northampton Town in the first round of the EFL Cup on Tuesday at 19:45 BST. Wrexham are in EFL Cup action at the same time, hosting Championship rivals Hull City.