Gillingham thrashed 10-man Dagenham & Redbridge in the Johnstone's Paint Trophy southern section quarter-final.
The Daggers began well, but Gills took the lead as Craig Armstrong's mis-hit cross floated in after 17 minutes.
It was 2-0 on 28 minutes when Chris Dickson's cross was not cleared and Aaron Brown volleyed home.
Dave Rainford was sent off for a handball in the area and Dickson scored the resulting penalty, before Dennis Oli stabbed home from close range.
Gillingham: Stillie, Clohessy, Cox, King, Armstrong, Howard (Bentley 84), Brown, Stone, Hamilton (Oli 61), Dickson, Cogan (Freeman 74).
Subs Not Used: Kiely, Sodje.
Goals: Armstrong 17, Brown 29, Dickson 60 pen, Oli 70. Dag & Red: Roberts, Huke, Boardman, Uddin, Griffiths, Moore (Sloma 62), Rainford, Southam, Taiwo, Strevens (Nurse 62), Benson (Taylor 80).
Subs Not Used: Thompson, Green.
Sent Off: Rainford (58).
Booked: Rainford, Taiwo.
Ref: Trevor Kettle (Rutland).