Leagueleaders Oxford United made it a ten-game unbeaten start to the season with their first-ever victory at the Racecourse Ground.
James Constable got the U's winner in the 29th minute with his seventh goal of the season on a hot September afternoon.
Both sides had a player sent off in the last ten minutes, and Wrexham boss Dean Saunders was sent to the stands.
First Frank Sinclair saw red for a second bookable offence, and a few minutes later United left back Steven Kinniburgh went for a similar offence.
The game was not as dirty as it sounds, but referee Richard West was quick to react to the noise of the fans and appeals of players.
Constable headed the U's goal by nodding in unchallenged from three yards out from Jamie Cook's fine inswinging corner.
It was Cook who had forced the corner with a free-kick shot that deflected wide.
Wrexham boss Dean Saunders would have been unhappy with his team's marking of Constable, but there will also be questions asked of keeper Chris Maxwell.
It was noticeable how poor the pitch markings were and in the bright sunlight it was impossible to make out many of the lines.
Wrexham settled quicker than the visitors, who had a let-off in the fourth minute when they might easily have fallen behind.
Mark Creighton's sloppy clearance presented a chance to Marc Williams, but he embarrassed himself with an air shot. Nevertheless, the ball still ran free to Wes Baynes, and his cross-shot rolled past the far post.
United skipper Adam Murray had been pole-axed by a late challenge from Gareth Taylor in the opening minutes, but Murray appeared to get his own back, if not on the same player, with a similar foul on Curtis Obeng following his spell of treatment.
The Red Dragons shaded the opening 20 minutes and Ryan Clarke had to make two low saves from long-range shots by midfielder Mark Jones, the second one deflecting.
Constable's goal gave the U's a lift, and Maxwell was forced to turn a 20-yard drive from Dannie Bulman around his near post.
Then, as the visitors started to assert their authority, looking dangerous on the break, Constable ran clear and was tripped by Frank Sinclair 30 yards from goal, the former Chelsea defender possibly lucky to escape with a yellow card in the end.
Oxford hadn't conceded a goal for nearly seven hours as half-time approached, and they have stretched their clean sheets run that far with some fantastic defensive challenges.
Two more came either side of the break, the first by Simon Clist, preventing Marc Williams turning in a shot, and a second following after the restart with a last-ditch tackle by Cook.
Wrexham enjoyed a strong spell of possession at the start of the second half, and Hedi Taboubi's left-footed drive from 18 yards brought another good stop from Clarke.
Moments later, Taboubi was booked for simulation after trying to win a free-kick by diving over Matt Green's foot.
The game died for a spell, which suited the visitors well, and midway through the second half, after Saunders had made two substutions for his team, Chris Wilder brought on Adam Chapman for Matt Green.
That meant a return to Constable more on his own up front, with Murray just behind.
And the striker got a scoring chance straight away, only to be denied by Maxwell.
Damian Batt was booked just after a far worse foul on Constable at the other end went unpunished, probably because it was by Sinclair, and that would have meant him being sent off.
But it didn't take long before Sinclair did go, and then Kinniburgh followed, as did other bookings.
Cook should have made the game safe in injury time when he dribbled through, but shot at the keeper from close range.
With Mansfield losing in the end, Oxford United are now seven points clear at the top of the table.
Oxford Utd: Clarke; Batt, Foster, Creighton, Kinniburgh; Bulman, Murray (Midson 82), Clist; Green (Chapman 68), Constable (Sandwith 85), Cook. Subs not used: Turley, Perry. Sent off: Kiinburgh. Booked: Kinniburgh, Murray, Batt.
Referee: Richard West (East Yorkshire).
Att: 3,620.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article