A review of Tuesday night's Scottish League Cup second-round action, including a defeat for holders St Mirren at Queen of the South.
The Scottish Premiership side were taken to extra time but despite seeing Paul McGowan miss a penalty, they kept their composure to take the lead with Steven Thompson's header on 95 minutes.
However, their second-tier opponents fought back with Stephen McKenna's fabulous leveller before Paton pinched the win five minutes from time.
The League One strugglers fought back from being behind at half-time as goals from Sean Winter, Chris Aitken and Martin Grehan gave them the scalp of the men from Dingwall, who netted through Richard Brittain and Orhan Mustafi.
The striker scored an emphatic header four minutes before half-time to maintain the Championship leaders' 100 per cent record for the season, while top-flight Kilmarnock were eliminated at the second-round stage for a second successive year.
Defender Brad McKay notched the decisive spot-kick after Ross Callachan saw his effort saved by substitute goalkeeper Mark Ridgers.
Championship side Raith had taken the lead in the 50th minute when Liam Fox drove a shot into the net after a Calum Elliot run into the area caused panic.
But Jamie Hamill netted from the spot 12 minutes later and was involved in the incident that led to Raith's Dougie Hill being red-carded in the 74th minute, before the high drama of penalties settled the issue.
Thistle needed a Scott Fox penalty save to send them into extra-time and their frustration grew when Kane Hemmings cancelled out Elliott's opener within 90 seconds.
But Lawless finished well and Aaron Muirhead settled the issue from the penalty spot.
But of more concern to the Premiership side will be the second-half injuries which threaten to affect their league campaign.
The Dons lost both Willo Flood and Jonny Hayes to injury, the latter the result of a sickening clash of heads with Alloa defender Daryll Meggatt.