Liam Buchanan's late penalty rescued Dunfermline Athletic and prevented Inverness Caley Thistle leapfrogging them off the bottom of the table.
Paul Burns sent a superb long-range effort against the base of the post as the Pars dominated the first half.
But Gregory Tade headed in after 33 minutes when Richie Foran crossed after a slip by Alex Keddie.
The Pars denied Inverness their first clean sheet of the season after David Proctor fouled Buchanan in the box.
Their first goal - striker Buchanan's first for the club - in 383 minutes of football ended Dunfermline's alarming slide down the Scottish Premier League table - they went into the game with only one draw in their previous six games.
And it leaves Terry Butcher's side a point behind the visitors.
Manager Butcher had kept faith with the same starting line-up for a third successive game despite last weekend's defeat by St Johnstone.
However, it was Dunfermline, for whom Jason Thomson and Keddie started in place of Ryan Thomson and Andy Dowie, who dominated the first half.
Andy Kirk sent a drive wide when he ought to have hit the target and fellow forward David Graham also shot wildly over.
The Pars were left cursing their luck when a superb 25-yard drive from full-back Burns found the inside of a post and rolled across the goalline before spinning for a goal-kick.
Caley Thistle's Ryan Esson fisted away a John Potter header following a corner and the goalkeeper saved superbly to turn wide a Joe Cardle half-volley.
However, Inverness went ahead against the run of play thanks to a slip from Keddie on the former Ross County defender's return to the Highlands.
Foran sent his cross into the penalty box and Tade found the net with a flying header that will have also pleased many fans of his former club and Dunfermline's Fife rivals, Raith Rovers.
Jason Thomson came off seconds after the break when he failed to recover from a foot injury suffered in the first half and was replaced with namesake Ryan.
The Pars, though, continued to threaten and Kirk hooked a shot over before Caley Thistle immediately responded with a 25-yard Greg Tansey free-kick that flew a foot wide.
A Graham free-kick flew through the Inverness wall but found the arms of Esson as Dunfermline appeared to cope better playing against the strong wind than the home side did in the first half.
Only a deflection off a defender prevented a David Davis drive finding the target as the game became stretched and chances started to be created at both ends.
Substitute Buchanan squared the game from the penalty spot after 86 minutes before Gary Mason missed a great chance to give the visitors a victory and Shane Sutherland had an effort well saved by Pars goalkeeper Paul Gallacher five seconds from the final whistle.
Sorry, we were unable to load match stats, please try again.