Crawley's Sergio Torres fired in a stoppage-time winner as the non-league side defeated Championship side Derby 2-1 in the FA Cup third round.
Miles Addison marked his first start after 12 months of injury hell by cancelling out Craig McAllister's first-half opener with a 62nd-minute header at the Broadfield Stadium.
But Derby, who missed a penalty through Kris Commons, saw their hopes of a replay snuffed out in stoppage time when Torres converted Dean Howell's corner to put the Blue Square Premier side through to a fourth-round tie at Torquay.