Danny Invincibile put Kilmarnock into the semi-finals of the CIS Insurance Cup after an exciting and stormy victory over Motherwell at Rugby Park.
Danny Invincibile's winning goal knocked Well out of the cup
Frazer Wright fired home the opener for Kilmarnock, but the defender pulled down David Clarkson to allow Richie Foran to equalise from the spot.
Wright's header restored the lead, but Clarkson slotted home from 12 yards.
Well boss Maurice Malpas was sent to the stand for dissent before Invincibile curled home the winner.
It was sweet revenge for Killie after September's 5-0 league defeat by Motherwell, who missed out on their third consecutive CIS Insurance Cup semi-final.
Garry Hay had returned from injury to replace Ryan O'Leary in the home starting line-up.
Marc Fitzpatrick came in for Well, with Jim Paterson missing out because of a back injury.
And a casual pass-back by the new member of the defence forced goalkeeper Colin Meldrum to handle outside the box.
The free-kick was rolled to Wright, who lashed the ball into the bottom corner.
Well striker Calum Elliot was denied by goalkeeper Graeme Smith and saw another effort deflected inches over the bar.
Killie came close to a second midway through the half when Colin Nish looped a header on to the bar after an Allan Johnston cross.
But Wright went from hero to villain when he hesitated before pulling down Clarkson.
Foran stepped up to drive the 25th-minute penalty into the bottom corner.
Invincibile drove wide and Meldrum got down well to smother a Nish effort from 25 yards.
Frazer Wright (left) scored a double for Kilmarnock
But Wright eventually put Killie back in front on the stroke of half-time when he nodded Peter Leven's long free-kick into an empty net after Meldrum rushed off his line and failed to collect.
Elliot drove wide from 12 yards as Well began the second half in determined mood. But Meldrum was called on at the other end to save a Nish volley from just outside the box.
The visitors grabbed a controversial equaliser.
Leven was down injured, but Motherwell were allowed to play on and Clarkson fired home from 12 yards following a pass from Stephen Maguire.
Malpas was sent to the stand as a result of the touchline arguments that followed.
And Invincibile put Killie back in front with a curling drive from the edge of the box.
Gary Wales, who made the Killie bench following knee surgery, narrowly failed to add to the scoreline and Meldrum denied Naismith.
And Killie held off a late Well surge to progress to the semi-finals.
Kilmarnock: Smith, Grant Murray, Greer, Frazer Wright, Hay, Leven (Wales 64), Fowler, Johnston, Invincibile, Nish, Naismith, Wales (Ford 90).
Subs Not Used: Combe, Dodds, Stephen Murray.
Booked: Grant Murray.
Goals: Frazer Wright 7, 45, Invincibile 71.
Motherwell: Meldrum, Quinn, Craigan, Reynolds, Fitzpatrick, McGarry (McBride 83), Lasley, Kerr, Foran, Clarkson, Elliot.
Subs Not Used: Graeme Smith, Kinniburgh, Connolly, Coakley.
Booked: Craigan, Clarkson.
Goals: Foran 25 pen, Clarkson 59.
Ref: K Clark