Hartlepool United suffered back-to-back defeats for the first time in the National League this season - but the 10-men were far from disgraced at Wrexham.
Luke Young opened the scoring in the first half for the hosts before Andrew Davies was shown a red by referee Martin Woods as Wrexham continued their unbeaten start to the season at the Racecourse Ground.
But despite being a man down, Pools were far from second best in this encounter, particularly in the second 45.
Having seen his side throw away yet more home points against Sutton at the weekend, and look uncharacteristically suspect at the back, Matthew Bates made two changes to his side, which also saw a backline reshuffle.
Ryan Donaldson was moved out to the left, with Mark Kitching benched, and Peter Kioso went out to the right with Myles Anderson coming into the back three. Further forward Marcus Dinanga was given his chance to shine, in place of Luke James - and he was in no mood to pass up the opportunity early on.
The striker went close to breaking the deadlock when he was picked out expertly by central defender Davies. Dinanga took ball on his chest, turned and fired low at goal but his effort from a tight angle was saved. From the resulting corner, Davies almost scored with a header but it ricocheted safe in a crowded area.
On the front foot Pools looked comfortable against their promotion-chasing opponents - the system seemed to be working well, too.
But the cracks started to show a quarter of an hour in when a Nicky Featherstone clanger almost gifted the hosts a lead. The midfielder was caught dwelling on the ball on the 18 yard box and somehow passed the ball to Akil Wright but the Dragons man shot wide when well placed.
If that was a warning shot for Pools, they failed to act on it as Wrexham looked sharp in the final third, finding space down both flanks at will.
The opener in this game came out of nothing, though - and it looked to be a particularly disappointing episode for usually reliable Scott Loach.
Thirty yards from goal Young decided to try his luck - few score past Loach from that distance, but this one skidded through and beat the Pools man all ends up, despite the strike being low and very close to his feet. Deflected, an error or a swerving ball? Without the benefit of replays at this level it was difficult to tell, but either way the former Watford and Ipswich Town man, a revelation this season, will be far from happy with it.
The next flashpoint of the game saw Davies given his marching orders... deservedly.
He clashed with Stuart Beavon on the deck and lashed out, appearing to headbutt the Wrexham player. Whatever the provocation the skipper cannot react like that. And with that act Pools went in a goal and a man down at the break. It could well have been worse had Kioso not cleared off the line when the impressive Jordan Maguire-Drew skipped clear in the area and fired past Loach.
Into the second 45, Pools tweaked their formation going to a 4-3-2 in the absence of Davies. The home side countered that by moving the ball from left to right and back in a bid to stretch Pools out.
A goalmouth scramble almost saw them add a second on 53, but it was somehow cleared and Wright went close soon after but again he could only guide wide of Loach's post for the second time in the game.
At the other end Wrexham captain Rob Lainton did his best impression of Loach's first-half error when he parried a Liam Noble strike from 35 yards which almost squirmed into the far corner.
A man down but Pools were much the better side in the second 45, much to the frustration of the home fans. Positive changes in terms of formation and substitutions certainly helped Pools' cause as Bates threw caution to the wind by keeping an attacking approach.
They just couldn't get that all important leveller, though, as the Dragons held on. Free-flowing in the first half, but far from convincing in the second, Wrexham claimed all three points but Pools can still take positives from it, having pushed their opposition all the way, despite being outnumbered for much of this encounter.
Substitute Luke James went closest to an equaliser but Lainton got down to deny the pacey frontman late on before Donaldson sent a dipping, curling effort inches over the top at the death. Close but no cigar for spirited Pools.