Danny Kedwell scored deep into first-half stoppage-time as 10-man Gillingham held out for a 1-0 home win over Southend in League Two.
Substitute Bradley Dack was brought down by Ryan Cresswell and Kedwell fired the spot-kick past keeper David Bentley at Priestfield on Tuesday night.
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.