Brave Rotherham United battled gamely until the dying seconds before succumbing to a 2-1 Championship defeat at Preston North End.
The match was deep into time added on when substitute striker Jonson Clarke-Harris headed past his own goalkeeper, Lee Camp, to condemn Neil Redfearn's side to a second successive loss.
It was cruel on a Rotherham side who had been full of effort but lacking in quality in the final third.
The Millers took the lead in the 36th minute when Tony Andreu fed Danny Ward and was on hand in the penalty area to head home Ward's inviting centre in fine style.
Just before that, Rotherham new boy Shay Facey had raced back to deny Adam Reach and, seconds after the goal, Paul Green blocked what looked like a certain equaliser when he got in the way of Joe Garner's shot.
Rotherham had almost led after nine minutes when Danny Ward was played through by Kirk Broadfoot and rounded the goalkeeper only to see his shot cleared off the line.
The Millers began the second half brightly but were soon under the cosh. There had been several near-misses from the home side and some heroic defending from the visitors before ex-Chesterfield striker Eoin Doyle levelled in the 64th minute.
Camp had saved Rotherham on several occasions but failed to come for a ball into the box which ended with Doyle hooking home from close range.
Rotherham showed one change from the team which had lost in midweek at Fulham. Facey, signed on loan from Manchester City earlier in the day until the end of the season, came in for his debut at right-back, with Frazer Richardson unavailable because of concussion.
It was the 20-year-old's first taste of senior football in England, and, with time almost up, it looked as if he was going to be part of a valiant away draw.
But a last-gasp ball into the box skimmed off Clarke-Harris's head to break Millers hearts.
Preston (4-4-2): Johnstone; Vermijl, Clarke, Wright (Huntington H-T), Cunningham; Johnson, Gallagher, Welsh (Browne 54), Reach; Doyle (Hugill 81), Garner. Subs not used: Kirkland, Kilkenny, Woods, Brownhill.
Rotherham (4-2-3-1): Camp; Facey, Rawson (Collins 82), Broadfoot, Mattock; Frecklington (Green 11), Smallwood; G Ward, Andreu (Clarke-Harris 59), Newell; D Ward. Subs not used: Collin, Wood, Derbyshire, Ledesma.
Goals: Doyle 64, Clarke-Harris og 90+3 (Preston); Andreu 36 (Rotherham).
Referee: Charles Breakspear (Surrey).
Attendance: 12,027 (1,038).