Danny Kedwell's seventh league goal of the season deep into first half stoppage-time helped ten-man Gillingham hold out for a 1-0 win over Southend and remain top of League Two.
Substitute Bradley Dack was brought down by Ryan Cresswell and Kedwell fired the spot-kick past keeper David Bentley.
The stopper was only on the pitch because Paul Smith had been stretchered off after a nasty collision with Deon Burton that led to nine minutes of stoppage-time.
Gavin Tomlin should have given the Shrimpers the lead on the half hour, latching onto Kevan Hurst's low cross, but he was brilliantly denied by Stuart Nelson.
An incident-packed first half ended with Dack seeing red for a naive lunge on Mark Phillips, giving referee Phil Gibbs no choice but to send him off.
It was backs to the wall for Martin Allen's men after the break as Southend pushed for an equaliser, but Tomlin and Britt Assombalonga both passed up good opportunities to level as the Gills held out.