Mark Harris' goal 12 minutes from time saw 10-man Wrexham beat FC Halifax Town 1-0 and end their perfect start to the season.
After a battling display, Town looked to have been handed the advantage when Jake Lawlor was sent-off with a quarter of the game remaining.
But all Halifax's hard graft was undone when Harris popped up to put the hosts in-front and inflict The Shaymen's first defeat of the campaign.
Town didn't do enough to win the game, but could certainly lay claim to a share of the spoils after a well organised and disciplined performance, so losing against 10-men will be tough to take.
Wrexham started very well, with crosses flashing through the box, Mark Harris' low shot held by Sam Johnson, and the Town keeper reacting superbly to tip over Nathan Clarke's blocking header, which forced three successive corners.
Any Halifax hesitancy was pounced upon, with The Shaymen committing some clumsy fouls and being rocked back defensively.
But they held out and eventually quietened the Wrexham roar.
Town didn't help themselves with some sloppy passing, but the composure of Cameron King, Michael Duckworth and Matty Brown helped them quell the early storm.
Wrexham pushed their full-backs high up the pitch and offered lots of movement and runs off the ball from midfield, but for all their possession, Johnson's only real test in the first 30 minutes had come from his own defender.
Halifax's only effort on goal in that time was a deflected shot by Jamie Allen that Christian Dibble did well to keep out at his near post.
Of Town's two changes from Saturday, Liam Nolan, who was making his first start in place of Niall Maher, and Jeff King, who replaced Saturday's match-winner Liam McAlinden, both skewed shots way off target.
Wrexham retained most of the possession but went off the boil as the opening half went on, and struggled to find a way through, round or over the Town defence, led terrifically by Brown.
There were glimpses of what The Shaymen were capable of going forward, such as Cameron King's deflected shot after a burst into the box and one-two with Tobi Sho-Silva, but they were too fleeting.
Again it was Cameron King that offered Halifax's best route to goal, displaying the technique, vision and ability to find space required.
Sho-Silva worked hard but had no chances, although the same was true of Wrexham striker JJ Hooper, while Town needed more of a threat from the flanks through Jeff King and Allen.
But 0-0 at half-time was perfectly acceptable.
It was even more so after Johnson produced a magnificent save low to his right to keep out Devonte Redmond's shot a few minutes after the restart.
Hooper's effort on the hour mark was straight at Johnson as Wrexham struggled to find some inspiration; Halifax had that in Cameron King, who carried a threat every time he got on the ball in advanced areas.
He found substitute McAlinden with a clever pass, but his shot was fired over from a tight angle.
Then, for the second away game in succession, Town's hosts were reduced to 10-men when Lawlor was dismissed for bring down Sho-Silva, who was running in on goal from Jerome Binnom-Williams' long pass upfield.
That meant Town had more time on the ball and could get up the pitch easier, as evidenced when Cameron King let fly from 30 yards and nearly found the net.
But the hosts took the lead, ironically at the time when they had looked least likely to score, when Harris cleverly dinked the ball over the onrushing Johnson from 12 yards.
Wrexham: Dibble, Barnum-Bobb, Pearson, Lawlor, Jennings, Summerfield, Young, Redmond (Rutherford 76), McIntosh (Carrington 70), Harris, Hooper (Oswell 90). Subs not used: Szczepaniak, Barton.
Scorer: Harris (78)
Shots on target: 7
Shots off target: 4
Halifax: Johnson, Duckworth, Clarke, Brown, Binnom-Williams, Staunton, Nolan, Cameron King, Allen, Jeff King (McAlinden 59), Sho-Silva (Odelusi 81). Subs not used: Appleyard, Hanson, Earing.
Shots on target: 3
Shots off target: 8
Referee: Simon Mather
Town man of the match: Cameron King