Dundee set up a Scottish Cup quarter-final against Queen of the South with a shock 2-1 win over Motherwell at Fir Park despite the Taysiders ending the game with nine men.
After a dour first 45 minutes, the second half exploded as Paul McHale and Scott Robertson shot the Irn-Bru First Division side in to a two-goal lead.
Well substitute Darren Smith pulled a goal back just after the hour mark but Dundee, who then had Kevin McDonald and Gary McKenzie sent off for picking up two yellow cards each, held on through five tense minutes of added time for a remarkable result against a team sitting fourth in the Clydesdale Bank Premier League..
It was a classic game of two halves - a first 45 minutes of dullness followed by endless second-half excitement but in the end the Dens Park side deserved their cup glory.
Wigan manager Steve Bruce was in the stand to watch Motherwell striker Ross McCormack, with whom he held talks over a possible transfer last week.
But it was Dundee hit-man Derek Lyle who had the first effort on goal after four minutes when he blasted an angled drive from 16 yards high over the bar.
The First Division side, cheered on by a decent travelling support from Tayside, certainly gave no indication that they felt inferior to Motherwell.
But in the 14th minute the home side had a chance to open the scoring when Steven McGarry latched on to a McLean lob into the Dundee penalty area only to mis-kick completely 12 yards from goal.
Moments later Dundee had a good penalty claim turned down by referee Eddie Smith when Lyle tumbled in the box following a clumsy challenge by home skipper Stephen Craigan.
That was the last real bit of excitement of the first half.
While play switched from end to end with encouraging regularity, neither side took control and it appeared that the first goal could be significant.
As the first half drew to its conclusion, the opener looked further away than ever, the game turning into a mind-numbing midfield battle, saved by Smith's half-time whistle.
The spectators shivering in the Fir Park stands perhaps warmed themselves with the thought that the second half could not be any worse.
And they were rewarded with a goal four minutes after the restart - although it was only the visiting fans who appreciated it.
A Davidson cross from the left was spilled by the unconvincing Well keeper Graeme Smith to the feet of Dundee midfielder McHale 12 yards from goal.
The former Clyde captain took a touch to steady himself then lashed the ball in off the underside of the bar.
There was more trouble for the Steelmen in the 55th minute when the visitors doubled their lead
Dundee midfielder Kevin McDonald fired in a dangerous cross from the left-hand side of the box which evaded Smith.
The on-rushing Lyle failed to make contact but the ball fell to Robertson at the back post who had the easiest of tasks bundling the ball in to the empty net.
Motherwell manager Mark McGhee immediately replaced McGarry and Keith Lasley with Smith and Simon Lappin to great effect.
Moments later, Lappin just failed to connect with a David Clarkson flick on which skipped past the far post.
In the 61st minute the home side grabbed a goal back in simple fashion when Steven Hammell's corner was bulleted home by the head of substitute Smith.
Lyle then missed a good chance to score when Motherwell keeper Smith took a Mark Reynolds backpass and played it straight to the Dundee striker who ballooned the ball over the bar.
In the 82nd minute McDonald, booked earlier in the game, was then sent off after another yellow card for a foul on Stephen Hughes.
Five minutes later team-mate McKenzie followed him after picking up his second caution, this time for a foul on Craigan.
As Motherwell piled forward, Dundee keeper Ludovic Roy pulled off a great save from McCormack's header but the Taysiders held on.