Super sub Steve Thomas condemned Southend United to a fifth successive defeat by sealing Wrexham's 1-0 win at Roots Hall.
The Welsh Under-21 midfielder replaced calf injury victim Paul Barrett after 12 minutes and found the target five minutes before the break.
Southend had the first chance, with midfielder Kevin Maher's 20-yard free kick forcing a great save from Dragons goalkeeper Paul Whitfield.
But Wrexham hit back with striker Lee Trundle's drive deflecting past the post, before his front partner Andy Morrell was denied from 12 yards on the turn by Shrimpers keeper Darryl Flahavan.
Flahavan did well again to smother Trundle's 12-yard shot after he had beaten home defender Stephen Broad.
In the 30th minute Dragons wing-back Shaun Holmes picked out Brian Carey with a pin- point cross, but the unmarked defender missed the target.
Wrexham defender Shaun Pejic had to clear Southend striker Barrington Belgrave's header off the goalline, before the visitors took a 40th minute lead.
Morrell beat Broad and let fly with a vicious 15-yard drive, which Flahavan parried into the path of Thomas to shoot home.
After the break home hitman Graeme Jones sent Maher's free kick against the face of the bar.
But Wrexham soon seized control again with Flahavan saving from midfielder Darren Ferguson, before Holmes smashed a 25-yard free-kick against the top of the bar, which bounced to safety.
Ten minutes from time, Wrexham keeper Whitfield kept a Damon Searle effort out with his legs, following a Maher corner.
But visiting schemer Jim Whitley should have sealed victory after racing clear, but Flahavan made a smart block at the midfielder's feet.
And in the very last minute, Whitfield ensured victory by palming Maher's 20-yard drive wide, before Belgrave's follow-up smacked against the foot of the right post