Jordan Storey struck a stoppage-time winner to condemn Middlesbrough to defeat in Michael Carrick's first match in charge.
Chuba Akpom gave Carrick a dream start with a close-range header but Emil Riis thumped home to equalise before half-time.
Both teams spurned chances before Akpom conceded a last-gasp free-kick from which Storey headed home to secure North End's second home win in nine attempts.
Boro remain out of the drop zone on goal difference while Preston are within three points of the play-off places.
More to follow.