Motherwell guaranteed European football for the 2013/14 season by coming from behind to beat Celtic at Fir Park.
Gary Hooper put the visitors in front at the second attempt after initially heading against the crossbar.
Henrik Ojamaa levelled for Motherwell following good work from Keith Lasley.
Charlie Mulgrew's clip on Ojamaa allowed Michael Higdon to score from the penalty spot, then Mikael Lustig's misplaced header came off post and Fraser Forster for Motherwell's third.
This energetic and attacking performance from Motherwell secures their place in a Europa League qualifying round - the fifth time in six years they will play on the European stage.
Stuart McCall's men are also one point away from confirming a second-place finish in the Scottish Premier League.
Neil Lennon's Celtic are already SPL champions but have now lost on both of their visits to Fir Park in 2013.
Almost immediately after the slightly delayed kick-off caused by a loose advertising board on the roof of a stand, Celtic's Tony Watt hit a dipping half-volley narrowly over Darren Randolph's crossbar following Tom Rogic's flighted pass.
And Motherwell showed early attacking intentions, too, when Nicky Law's whipped cross almost found Shaun Hutchinson in the six-yard box.
Rogic and Celtic captain Georgios Samaras combined at the edge of the box to create a shooting opportunity for Beram Kayal, but the midfielder's effort was held at head height by Randolph.
Referee Euan Norris overruled his assistant's offside flag to allow Kayal another blocked shot inside the box as the visitors continued to press.
As he so often does, James McFadden took it upon himself to excite the Fir Park crowd just short of the half-hour, jinking between Kayal and Lustig on the left-hand side before sending a right-foot strike high and wide of the far post.
Celtic reacted through a swift attack engineered by the impressive Rogic, who fed Samaras to deliver low for Hooper in front of goal, but the attentions of Motherwell full-back Stevie Hammell scuppered his finish.
'Well goalkeeper Randolph then offered any potential suitors something of a sales pitch.
The Irishman dived left to keep out Mulgrew's free-kick before making himself big to brilliantly deny Hooper from close range at the back post after Watt's precise cross.
At the other end, Thomas Rogne's handball did not bring a penalty for Motherwell, which was made all the more hard to swallow given that the Hoops broke the deadlock a minute later.
The lively Watt eluded Simon Ramsden on the left and poked a cross over the onrushing Randolph for Hooper to first head against the bar before he netted the rebound.
But Motherwell hit back on the stroke of half-time.
Captain Lasley used his experience to collect and distribute the ball in two touches, setting up Ojamaa to fire in low at Forster's near post from 18 yards.
And the Estonian forward won an innocuous penalty when clipped by Mulgrew after the restart.
Player of the season nominee Higdon stepped up to convincingly convert into the top-right corner for his 26th goal of the campaign.
Higdon, albeit seeming to be in an offside position from Tom Hateley's cross, made his presence felt again immediately as Motherwell got their third.
The Liverpudlian forced Lustig to head against his own post, with it rebounding off the back of Forster and into the net.
Watt's blocked shot almost got Celtic back into the game before Forster kept them in it, reacting brilliantly to claw away a Chris Humphrey drive which had deflected off Mulgrew.
Celtic introduced Paddy McCourt but Motherwell's chances flowed freely; McFadden thwarted by Forster when he looked odds on to score before Celtic's keeper stopped Higdon's low shot.
Substitute Anthony Stokes hit the post for the visitors late on but Motherwell deserved their victory.