Gillingham maintained their 100% away league record by beating Northampton.
Northampton's Chris Hackett hit the crossbar before Deon Burton collected a clearance from goalkeeper Stuart Nelson and calmly finished seconds later.
Jack Payne made it 2-0 with a 20-yard shot after Burton's short pass before Adebayo Akinfenwa scored for the hosts, heading in from Ben Tozer's long throw.
Gills' Charlie Allen was shown a second yellow card in injury-time but his side held on to stay top of League Two.
VIEWS FROM THE DRESSING ROOM
Northampton Town manager Aidy Boothroyd told BBC Radio Northampton:
"I thought it was a game we threw away. You create chances, hit the bar and put them on the back foot and then one punt down the middle of the pitch and it's a simple goal.
"You see that on a park on Sunday, not at a professional level. The centre-halves have been outstanding but tonight I didn't see that. It was an appalling mistake.
"We can all get excited that we got back in the game, but if you're going to be serious about being successful, that was very mediocre."