NK Maribor 2-1 Wigan Athletic
Wigan failed to progress to the knockout stage of the Europa League as Uwe Rosler's first game in charge of the Latics ended in defeat at Maribor.
A win would have sent Wigan through and they led through Jordi Gomez's penalty.
But Chris McCann was sent off for a second booking after handling in the area - and though Dejan Mezga's penalty was saved, he tapped in the loose ball.
Zalijko Filipovic's long-range strike sealed victory for Maribor, who finished second to reach the last 32.
The Slovenians had Ales Mertelj sent off late on after receiving his second yellow card, but that did not dampen the home side's celebrations following their unexpected progression.
Maribor started the day bottom of Group D but the win, coupled with Rubin Kazan beating Zulte Waregem 2-0 in the other game, ensured they finished second.
It was a harsh end for Wigan in their first venture into Europe, and they will likely feel aggrieved about McCann's sending off, which proved a pivotal moment in the match.
Defeat to Zulte in Wigan's previous Europa League game took qualification for the knockout stage out of their hands, but a victory alongside a home defeat for Zulte would have sent them through.
Rosler, who was named Owen Coyle's successor on Saturday, picked an attacking side and his influence was evident from the outset as Wigan passed the ball around while patiently searching for an opening.
That did not arrive until midway through the first half, when Nick Powell struck a dipping half-volley from 25-yards just over the bar, but they went closer soon after when Gomez curled a free-kick on to the post.
The 1,000-strong travelling support were cheering just before the break, however, when Powell was brought down in the box by Maribor defender Arghus and Gomez duly despatched the resulting penalty, hitting the ball under the diving Jasmin Handanovic.
But the away fans had barely settled back into their seats before the hosts levelled.
McCann was adjudged to have handled the ball inside the box when attempting to block a shot and the midfielder was harshly shown a second yellow card. Mezga's spot-kick was pushed on to the post by Wigan keeper Scott Carson, but the Croatian midfielder pounced to tap in the loose ball.
Carson was called upon to deny Damjan Bohar's fierce drive from a difficult angle soon after the restart, but to Wigan's credit they still created chances as Powell flashed a first-time shot wide from Jean Beausejour's cross.
But just as belief was starting to build among the Wigan players, Maribor snatched the lead just before the hour courtesy of Filipovic's fine strike. The midfielder unleashed a curling shot from 25 yards that flew in beyond Carson.
That left Wigan needing two goals to have a chance of progressing, while Maribor themselves were still not through with the game between Zutle and Rubin Kazan goalless at that point.
Ben Watson stung the hands of Handanovic with a decent effort from 20 yards shortly before Damjan Bohar missed a gilt-edged chance to wrap up the win when he poked wide after being put through one-on-one.
Maribor were also reduced to 10 men as the game entered the closing stages when Mertelj was shown a second yellow for a foul on Gomez.
Handanovic then superbly kept out Marc-Antonine Fortune's rasping shot from 12 yards to deny Wigan a dramatic equaliser and keep Maribor in the Europa League.
Wigan manager Uwe Rosler:
"The referee didn't have his best day, he influenced the game in a massive way. He looked to me very inexperienced, he made a lot of errors.
"I can only say I'm very proud of my players, not only with the way they played but they never gave up. We attacked more and in the last minutes it was one-way traffic.
"I think everybody in the stadium would agree that we were the far better team. With no sending off, we would have won the game."
- 28VilerBooked at 83mins
- 70MerteljBooked at 74mins
- 44BordignonBooked at 40mins
- 8MezgaSubstituted forCrnicat 81'minutes
- 9Morales TavaresBooked at 54minsSubstituted forCvijanovicat 78'minutes
- 17FajicSubstituted forMendyat 85'minutes
- 7McCannBooked at 42mins
- 6RogneBooked at 88mins
- 15McManamanSubstituted forWatsonat 45'minutes
- 16McArthurSubstituted forBoyceat 75'minutes
- 19PowellSubstituted forFortunéat 65'minutes
- 14Jordi Gómez
- 18EspinozaBooked at 19mins
- Szymon Marciniak
- Shots on Target