Chesterfield beat Boreham Wood 3-2 at the Proact Stadium in a highly-entertaining Vanarama National League encounter.
The Wood forged in front after 28 minutes when Keiran Murtagh curled a superb free-kick into the top corner from 25 yards.
But Tom Denton levelled before the break, and Chesterfield went in front early in the second half from a Scott Boden penalty, awarded for a handball in the box by Immanuel Parry.
Luke Garrard’s men also registered from the penalty spot when Josef Yarney handled and Justin Shaibu stepped up to level.
Parry was sent off with 20 minutes remaining for picking up a second yellow card, and it gave Chesterfield the impetus as Denton headed in his second when Legg fumbled a routine cross.