A stunning late strike from Andre Ayew earned Swansea a narrow 1-0 victory in their Championship play-off semi-final first leg against 10-man Brentford.
An open first 45 minutes made way for a dramatic second, as Ayew had a penalty saved by Brentford's David Raya moments before defender Rico Henry was controversially sent off after a challenge on Connor Roberts.
But Ayew atoned for the spot-kick miss with nine minutes to play, when he smashed an unstoppable effort home after Jay Fulton's knock-on, to set up a tense second leg, which takes place at Griffin Park on Wednesday night, live on Sky Sports Football.
How Swansea carried their momentum into the play-offs
Having passed up two gilt-edged opportunities to achieve automatic promotion to the Premier League in the final 10 days of the regular season, questions were asked as to whether Thomas Frank's men would have the mentality to be able to cope with a Swansea side riding high after their dramatic, last-minute top-six finish.
There was no evidence of a hangover in the early stages, at least, as Ollie Watkins' improvised header forced a smart save from Erwin Mulder, before the striker headed over from close range shortly afterwards. But the hosts responded well and were denied the opening goal in the tie when Liverpool loanee Rhian Brewster's vicious first-time effort was well kept out by Raya.
Arguably the best chance of the half came six minutes before the break, when Ayew's header rebounded off the post, but Brewster - whose offside position went unseen by the linesman - saw his weak connection smothered by Raya, though Said Benrahma soon surged into the area and hit a swerving effort narrowly over the crossbar on the stroke of half-time.
Mathias Jensen struck a shot the wrong side of the post in the minutes after the restart, but with less than half-an-hour to play, the game sparked into life, when Pontus Jansson brought down Brewster inside the penalty area. A strong left hand from Raya kept out Ayew's spot-kick, but within moments, Brentford had further issues to contend with.
Left-back Henry slid in heavily on Roberts close to the touchline and, following furious protests from the Swansea bench, referee Keith Stroud produced a straight red card, though replays suggested the 23-year-old got a touch on the ball on his way through.
And though the tie was finely poised heading towards the final whistle, the hosts finally made their numerical advantage count when Ghana international Ayew found the top-right corner in style, dealing Brentford their third straight defeat.
Live EFL C'Ship PlayOff SF 2nd Leg
Man of the match - Andre Ayew
The 30-year-old winger probably would not have envisaged he would play such a vital role for the Swans this season, having spent last term out on loan at Fenerbahce, but he has been integral to Steve Cooper's plans, with the winner his 18th goal in 46 games.
He works so well with the young squad built around him and led by example on Sunday, by bouncing back from his penalty miss to win the game late on.
Analysis: Should Rico Henry have been sent off?
Sky Sports' Jobi McAnuff...
"I thought it was harsh. For me, it's not really whether he gets the ball or not; I didn't really think he was using excessive force. I think it was a reckless challenge, but that should say it's a yellow card, more than a red."
Sky Sports' Gary O'Neil...
"Seeing it back, Rico will be disappointed with it. Not that it's overly aggressive or he's gone to endanger anybody, just the fact that it gives the ref an opportunity to send him off. When Brentford see that back, they'll ask: 'Rico, do you need to go in like that?'.
"I think it's worth an appeal. I don't think it's a given but it's definitely worth asking the question because it's right on the borderline between red and yellow."
What the managers said...
Swansea's Steve Cooper: "I thought the first half was very even, a tactical game with quite a lot going on and I think both teams had some good chances. Second half there was a lot going on, with the penalty, the goal and the red card. It's different territory, knowing you've got another 90 minutes or so, but I'm pleased with the performance. It's a 1-0 advantage, but it's only an advantage if you use it well.
"It was a clear red card. I like Rico Henry and I think he's a really good player, but it was dangerous, it was reckless and I'm just really happy that Connor got up. Unfortunately for them it was a clear red and I've got no argument."
Brentford's Thomas Frank: "Firstly, I want to say that I'm unbelievably proud of my players. Of course, everyone is saying that Brentford have crumbled in the last few games. I 100 per cent disagree and I don't think so. And I think, if we did, we wouldn't have come out with that personality and approach to this game. I think we were, by far, the best side until the red card in a good football match between two good footballing sides. Until the penalty, we should have been at least one up.
"When you play two games for promotion to the Premier League and you play for £170m, people need to be really, really sure when they make the decisions. I don't understand why there can't be VAR in these games. With so much at stake, they need to nail it. From my point of view, it was absolutely not a red card. We are going to appeal this and I am absolutely 100 per cent sure we'll have a decision where Rico can play on Wednesday."
Swansea and Brentford will meet again in the second leg at Griffin Park on Wednesday July 29, when one of the two teams will advance to the play-off final at Wembley on Tuesday August 4. Coverage gets under way on Sky Sports Football at 7pm; Kick off 7.45pm.