A stoppage-time penalty condemned Harrogate Town to a third successive National League defeat as AFC Fylde snatched the spoils at the CNG Stadium.
Mark Beck's late strike looked to have earned Simon Weaver's team a deserved point on Saturday afternoon, only for Danny Rowe to atone for an earlier miss from 12 yards by deciding matters from the spot.
Having witnessed his side lose both of their previous two outings, boss Weaver had demanded a reaction and, just as they did in their Boxing Day reverse to Halifax, Town began brightly.
Just three minutes were on the clock when skipper Josh Falkingham sent a low strike from the edge of the box narrowly the wrong side of the post.
The hosts' best chance of the opening half then came and went with 12 minutes on the clock.
They managed to keep the ball alive inside the Fylde area and Falkingham lifted a cross to the back post where Kelvin Langmead headed wide despite having a large chunk of the goal to aim at.
Town came closer still to breaking the deadlock when Joe Leesley delivered a free-kick from the left that visiting skipper Neill Byrne took it upon himself to volley against his own upright.
From the resulting corner, Liam Kitching climbed majestically, only to clear the cross-bar by some distance.
That was however that for the home team's attacking threat in the first half, as despite having started so well, they seemed to lose their way.
As they struggled to string more than two passes together and dropped deeper and deeper, the Coasters almost edged in front after 32 minutes.
A lovely move saw the ball shifted from right to left, Zaine Francis-Angol crossing for Andy Bond who teed up Rowe to rattle the crossbar from close range.
The visitors finished the first period very much in the ascendancy and began the second by taking the lead.
A free-kick was harshly awarded against Callum Howe for a challenge on Arthur Gnahoua almost 30 yards out and Rowe managed to curl a strike over the wall and past James Belshaw, despite the Harrogate stopper getting a hand to it.
The Town response to falling behind was positive and they managed to apply some pressure to the Fylde goal, forcing a series of corners.
Twice Warren Burrell got his head to Leesley deliveries, but he couldn't convert on either occasion.
The Coasters were then handed the chance to double their tally when Nick Haughton broke at pace before going down in the home box under pressure from Falkingham.
Referee Peter Gibbons pointed to the spot, yet Belshaw guessed right and managed to keep out Rowe's attempt from 12 yards.
Reprieved, Town kept coming and they managed to pull level with eight minutes of normal time remaining, substitute Beck swivelling and rifling into the roof of the net from six yards out when the ball eventually broke for him.
Neither side looked happy to settle for just a point, and Town needed a good save from Belshaw to thwart Haughton and keep them on terms.
With two minutes of injury-time already played, it seemed as if the contest would end all-square until Serhat Tasdemir just about beat the offside trap and broke through on goal.
Burrell and Langmead raced back to challenge him, and as both men closed in on the ball, referee Mr Gibbons adjudged at least one of them to have done so in an illegal fashion and awarded a second penalty of the afternoon.
This time Rowe made no mistake, firing down the middle of the goal as Belshaw again dived to his right.
Things then went from bad to worse for Town as Kitching was booked twice in quick succession while remonstrating with Mr Gibbons in the aftermath of the goal and departed for an early bath.
Weaver and his men remain sixth in the National League standings despite the result.