Dagenham and Redbridge climbed out of the League One relegation zone at the expense of beaten rivals Notts County.
John Akinde volleyed the Daggers' first before the visitors were reduced to 10 men when Graeme Lee dragged down Jon Nurse outside the area.
Danny Green swept in the resulting free-kick and then notched a penalty after John Spicer fouled Akinde.
County's Njogu Demba-Nyren then headed home but it was nowhere near enough to avert a seventh straight defeat.
The Daggers are now in 19th place in the table, two points ahead of Carl Heggs' side in 21st, but the Magpies do have a game in hand.