With no wins in seven games and no goals in five, few would have backed Motherwell to overturn Dundee United's half-time lead.
However, United lost their way after Jim McIntyre's header came back off the post and a stunning second-half hat-trick from 18-year-old David Clarkson gave Well their first home win since August.
The victory was achieved without midfielder Stephen Pearson who looks to have played his last match for Motherwell as Celtic wait to secure his signature.
The compensation for home supporters was the sight of 1991 Scottish Cup winner Phil O'Donnell coming on as a late substitute after re-joining the club.
Dundee United took the lead after 15 minutes in slightly controversial style. A soft challenge on striker Jason Scotland earned the visitors a disputed free-kick and Mark Wilson then added insult to injury by beating keeper Gordon Marshall with a swerving low drive from 25 yards.
The post kept out McIntyre's downward header on the stroke of half-time and the United forward then limped off with a hamstring problem to follow Chris Innes who lasted only 35 minutes before suffering a recurrence of an old groin injury.
Motherwell battled to take advantage while United reorganised and in the 52nd minute Jason Dair's header from a Derek Adams set-piece was cleared off the line.
The offside flag had frustrated Motherwell all afternoon but on the hour-mark Clarkson finally managed to stay onside and rounded keeper Paul Gallacher before rolling the ball into the net from an acute angle.
Adams, who later struck the bar, and Keith Lasley both went close to goal number two but Clarkson refused to be denied and nodded his team in front midway through the second period.
O'Donnell's appearance for the final 11 minutes increased the feel-good factor in the home crowd and after wasting two golden opportunities to complete his hat-trick Clarkson added the icing on the cake in the third minute of injury time as he shrugged off Wilson's tackle and smashed the ball past the advancing keeper.