Gary Holt helped Kilmarnock keep up their impressive run with a late winner against a dogged Dunfermline.
The visitors would no doubt feel ill done by as the home side were awarded a controversial penalty in the 37th minute that got them back into the game.
Holt's powerful run into the box was matched by Chris McGroarty and the Pars' man appeared to have won the ball fairly.
But the referee's assistant thought otherwise and after consultation with the referee a penalty was awarded.
The incident preceded three bookings for irate Dunfermline players with McGroarty, goalkeeper Marco Ruitenbeek and Rob Matthaei all yellow-carded.
Pars' manager Jimmy Calderwood was also an angry man and just before the interval he was sent to the stand for comments made to the referee.
The visitors proved a difficult unit to break down for Kilmarnock who had Andy McLaren back in their starting line-up.
Although they had the bulk of the play they found good scoring opportunities hard to come by.
Holt had the best of the few chances that did come along but his header in the 28th minute from Ally Mitchell's cross was off target.
Then the Pars shocked the Rugby Park side with the opening goal on the half-hour mark.
A powerful shot by Matthaei brought out a terrific save from Gordon Marshall.
Unfortunately for him, the ball fell to Stevie Crawford and the striker lashed the ball high into the net from a couple of yards.
The goal rattled Killie as Dunfermline came more and more into the game but then came that controversial incident which got the Ayrshire side back level.
When all the fuss had died down Paul Wright sent the spot-kick low into the corner of the net for his third goal of the season.
Kilmarnock had the better of the second half in possession terms but their attempts at goal seldom troubled the visitor's defence.
McLaren had a couple of long-range efforts but they provided little danger for Ruitenbeek.
A double save from Marshall in 68 minutes from David Graham denied the Pars from going ahead again and bring Kilmarnock's six-game unbeaten league run to an end.
Then, seven minutes from time came the dramatic winner with Holt rushing into the box and heading substitute Christophe Cocard's cross into the net.