A rare Zeljko Filipovic goal helped Maribor beat Wigan Athletic 2-1 to progress into the UEFA Europa League knockout stages.
Zulte Waregem's 2-0 defeat against Group D winners Rubin Kazan coupled with Maribor's victory sent the Slovenian champions into the round of 32 in what ended up being a winner-take-all clash on Thursday with the English FA Cup holders.
Filipovic's first goal for the club since July 2012 proved to be the difference after Jordi Gomez had put Wigan in front from the penalty spot after 41 minutes.
But Wigan's first away goal in the competition in their debut European season was cancelled out almost immediately by Dejan Mezga.
Both teams were reduced to 10 men – Chris McCann and Ales Mertelj were given their marching orders – before Filipovic's strike and two late goals in the other Group D fixture in Brugge added to the drama and ensured that Maribor avoided a third consecutive exit at the group stages having started the evening bottom.
Defeat for Wigan in new manager Uwe Rosler's first game in charge represented the sixth successive loss in all competitions for the Championship club.
Filipovic gave Wigan an early scare after seven minutes with the first chance of a cagey opening after he was afforded plenty of time and space 20 yards out before crashing a rising shot that flashed wide and had goalkeeper Scott Carson scrambling for his top left-hand corner.
Nick Powell, who netted a brace in Wigan's 3-1 win in the first meeting between the two sides in October, volleyed over from just outside the penalty area after collecting Jean Beausejour's bobbled pass.
Gomez triggered a frantic final 10 minutes of the first half when he saw his 20-yard free-kick rebound to safety off the post after being felled by Marcos Tavares.
The Spanish midfielder did find a way past goalkeeper Jasmin Handanovic , though, four minutes before the interval from the penalty spot.
Arghus was slow to react to Gomez's pass and Powell nipped in to prod the ball away from goal and draw a clumsy challenge from the Brazilian defender.
Gomez sent the subsequent spot-kick straight down the middle, sparking wild celebrations among Wigan's travelling fans that quickly turned to despair as Maribor levelled less than two minutes later.
Mitja Viler's shot glanced against McCann's arm and referee Szymon Marciniak was quick to point to the spot again and give the former Burnley midfielder his marching orders for a second bookable offence.
Carson did superbly to get down low to his right and palm Mezga's effort against the post, but he was powerless to prevent the penalty taker from tucking away the rebound from inside the six-yard box.
Powell turned Beausejour's cross wide five minutes after the restart as the visitors initially responded well to going down to 10 men before Filipovic put Maribor ahead with a fantastic strike just before the hour.
Mezga's cut-back fell invitingly for Slovenia international Filipovic and he coolly dispatched a side-footed effort from 25 yards that nestled in Carson's top left-hand corner.
Mertelj was then sent off with 16 minutes remaining for a rash tackle on Gomez, earning his second yellow card, and Handanovic kept out a late Marc-Antoine Fortune effort as Maribor progressed in dramatic style.comments