Macclesfield staged a dramatic comeback to beat visitors Wrexham thanks to two goals in stoppage time.
Wrexham were cruising when Michael Proctor struck an early penalty after being fouled by James McNulty, then Chris Llewellyn stroked home a cross.
Martin Gritton headed one back before half-time from Levi Reid's flick-on.
But Wrexham crumbled after Rob Garrett was sent off late on, first David Morley heading the Silkmen level before Danny Thomas struck a left-foot winner.