Wrexham needed a late Steve Fletcher penalty to clinch a come-from-behind win at home to Blackpool.
The visitors took an early lead when James Husband crossed from the left to find Ashley Fletcher, who nodded the ball home at the near post.
Wrexham recovered from that setback when Ollie Palmer's headed flick-on found strike partner Paul Mullin - restored to the starting line-up for the injured Elliot Lee - who crashed a left-footed volley beyond Harry Tyrer.
It needed a fine Mark Howard save to keep out Oliver Casey's header to prevent the visitors snatching the lead back just before half-time.
Wrexham redoubled their efforts after the break and Tyrer did well to prevent Mullin grabbing a second when he latched onto Fletcher's header.
But in a late twist, Casey was penalised for handball in the Blackpool area and Fletcher stepped up to convert the spot kick for all three points.
The Dragons remain third, but Phil Parkinson's side will be grateful to get back to winning ways after two successive draws, while Blackpool drop two places to 15th after seeing their recent good run of form ended after three wins and a draw from their previous four games.
Wrexham assistant manager Steve Parkin: "We are really delighted. We had the sadness of the last home game here when we conceded late... so for us to get the late goal today was really important and they way the lads played second half was probably justified.
"I think first half we didn't quite have the edge that we wanted in the game but sometimes you have to give the opposition credit.
"They got an early goal which was disappointing from our point of view but they're a good side away from home and they've had some good results.
"The message at half-time was to have a whole-hearted Wrexham performance, down the slope let's lock attacks in, be on the front foot... it was great, we got lots of attacks in."