Petrolul Ploiesti 2-1 Swansea (Agg 3-6)
Swansea City confirmed their place in the Europa League group stages despite defeat by Petrolul Ploiesti in Romania.
The Swans, leading 5-1 from the first leg, fell behind in the second half when Njongo Priso found space to fire past keeper Gerhard Tremmel.
Roland Lamah equalised a minute later from inside the box but Hamza Younes's header restored Ploiesti's lead.
Leon Britton was sent-off late on following a second yellow card and will now miss the first group stage match.
The Swans will discover their opponents when the draw is made in Monaco on Friday lunchtime.
Michael Laudrup's side had taken a big step towards securing their place in the group stages a week earlier with a convincing victory at the Liberty Stadium.
The side which lined up against the Romanian Cup holders showed six changes from the first leg with striker Rory Donnelly handed his first start and Britton captain in the absence of Ashley Williams.
Despite Swansea's four-goal aggregate lead, manager Laudrup had spoken before the game of the need to adopt the right attitude.
Roared on by a noisy support the home side made a positive start and looked determined to make it an uncomfortable evening for the visitors.
Swansea players were on the end of some fierce tackles and Priso was booked for a foul on Britton.
But the Swans slowly settled into the game and Michu played in Donnelly but the 21-year-old fired wide.
Clear-cut chances were at a premium, although Younes tried his luck with an acrobatic effort from the edge of the box following Ploiesti's first corner of the game.
Donnelly made plenty of running leading the line for Swansea but let a good chance pass him by after hesitating and allowing Mircea Bornescu to gather the ball at his feet.
There was a let-off for the Swans a minute before the interval when Tremmel could only palm away Younes's close-range effort and Britton was forced to head off the goal line.
Tremmel was called into action in the opening minute of the second half, tipping Filipe Teixeira's rasping effort round the post.
Ploiesti were enjoying a promising spell, although Brazilian Guilherme could only direct his free-kick straight at Tremmel and Geraldo Alves fired a weak effort wide.
That sparked a Swansea response and Michu's excellent pass found the advancing Donnelly, whose cross into the six-yard box deflected off Alves and hit the post.
The second half was a more open contest and Pablo Hernandez was first denied by Bornescu and then fired over the crossbar from the edge of the area.
Donnelly did manage to find the back of the net but was adjudged to have handled the ball with his second attempt after an initial shot was saved by Bornescu.
Ploiesti broke the deadlock with 17 minutes remaining when Priso was given far too much space to fire past Tremmel to give his side the lead on the night.
But Swansea hit back immediately when Alejandro Pozuelo found Lamah unmarked in the box and the substitute guided the ball past the keeper.
Younes restored Ploiesti's lead on the night with a glancing header from Guilherme's cross from the left before the Swans were reduced to 10 men with five minutes left.
Britton, who had been booked in the first half, was shown a second yellow card for kicking the ball away.