Danny Dichio's double took Preston into the FA Cup fifth round at the expense of their Coca-Cola Championship rivals.
Dichio's goals - the second coming two minutes from full-time - clinched this fourth-round replay as North End came from behind after Darren Ward had given Crystal Palace a 26th-minute lead.
But Dichio equalised nine minutes later - and then headed the winner in front a crowd of only 7,356 to earn Billy Davies' men a home tie against either Middlesbrough or Coventry in round five.
This was the third time in 11 days that these promotion chasing sides had met - and goalscoring chances were scarce.
Palace produced the only fluent move of the first half in the 12th minute. Marco Reich, Jobi McAnuff and Dougie Freedman were involved in a burst that swept the length of the field and that was curtailed only by a fine sliding challenge by Lewis Neal on McAnuff inside the Preston box.
McAnuff also played a crucial part in Palace's 25th-minute opener. He swung over a corner from the left that eluded everyone in the centre but fell to the unmarked Ward at the far post, and the centre-back bundled the ball in from close range.
Tension was running high off the pitch, with Palace boss Iain Dowie gesturing angrily towards the Preston dug-out on the half-hour mark after Andrew Johnson had tumbled over Preston goalkeeper Carlo Nash.
And Dowie's mood darkened further when Preston scored their equaliser, Dichio heading Paul McKenna's free-kick from the right into Gabor Kiraly's bottom-left corner after the set piece had been moved forward 10 yards, apparently for dissent by Johnson.
Palace wasted a chance to regain the lead two minutes before the break when Johnson headed McAnuff's right-wing cross straight at Nash from eight yards.
If the first half had been tight, the second was even more cagey, with neither side capable of finding the pass that would unlock the other's defence.
Neal's shot from the edge of the Palace box deflected off Emmerson Boyce for a corner in the 55th minute, while at the other end Reich curled a right-footed effort just wide from 20 yards seven minutes later.
Preston's top scorer David Nugent almost put his team in front a minute after coming on as a substitute, but was denied by a superb Boyce challenge after Dichio had nodded the ball into his path 15 minutes from full-time.
Just when the game appeared to be heading for extra-time, McKenna sent over another free-kick from the right - and there was Dichio once more to head it past Kiraly.
Teams
Crystal Palace: Kiraly, Ward, Hudson, Boyce,
Borrowdale (Andrews 90), Riihilahti, Watson, Reich (Soares 90), McAnuff, Johnson, Freedman (Macken 72).
Subs Not Used: Speroni, Wilson.
Booked: Hudson.
Goals: Ward 26.
Preston: Nash, Mawene, Mears, Hill, Lucketti, McKenna, Sedgwick, O'Neil (Hibbert 87), Lewis Neal (Nugent 74), Agyemang, Dichio.
Subs Not Used: Ward, Davidson, Parillon.
Goals: Dichio 35, 88.
Att: 7,356
Ref: P Armstrong (Berkshire).