Raith supersub Harry Panayiotou missed a stoppage-time penalty before netting a last-gasp equaliser to delay Rangers title celebrations.
Louis Longridge silenced the majority inside Starks Park when he fired a dipping volley past Wes Foderingham on 24 minutes.
Rangers drew level five minutes later when Harry Forrester headed home a Barrie McKay corner.
Forrester turned provider to put the visitors in front on 35 minutes when his neat turn and cross was tapped in at the back post by Michael O’Halloran.
James Craigen replied for the hosts four minutes later but Kenny Miller edged the Ibrox side back in front four minutes after the restart when he fired home after collecting an Andy Halliday pass.
The Gers faithful thought it was their day when Foderingham saved Panayiotou’s penalty in stoppage time but the on-loan Leicester hitman atoned for his miss by bundling home a last gasp leveller.
The result means Rangers can win the title at Ibrox on Tuesday night against Dumbarton but boss Mark Warburton felt it was a missed opportunity.
“We’re frustrated, we have to defend better thats for sure but we were good today on a difficult surface but we should’ve been out of sight.
“As it is we’ll learn from it and do the job on Tuesday night.”
Meanwhile Raith manager Ray McKinnon was delighted to prevent a title party.
“It probably had everything except the outcome for the majority of fans here.
“We’re delighted, we had our own agenda we needed to take something out the game and I thought my guys were great today.”