NEVER-SAY-DIE Rotherham United struck in time added on to stay top of League One.
The Millers looked set for a 1-1 draw at in-form Accrington Stanley but Ben Wiles glanced in a 91st-minute header to win the contest and send a packed away following into raptures.
It was a tale of the substitutes for Rotherham because top scorer Freddie Ladapo had climbed of the bench to put them in front within three minutes of his introduction and Wiles had also been among the replacements.
Paul Warne's men have lost only once in their last 13 league outings and head to second-placed Coventry City on Tuesday.
Chances were at a premium in the wind and cold during a scrappy first half at the Wham Stadium.
Jordan Clark, for the home side, and Hakeeb Adelakun traded off-target shots but there was no clear sight of goal for either team until the 24th minute.
Dion Charles looked certain to score for Stanley after goalkeeper Dan Iversen had got his challenge all wrong but Matt Olosunde saved the Millers with a stunning sliding intervention.
Twelve minutes later, Charles was set up by Clark but blazed over the Rotherham goal and soon after Iversen saved low down when Ajibola Alese tried his luck from distance.
The Millers had made two changes, preferring the experienced Joe Mattock instead of Ben Wiles at left-back and opting for Matt Olosunde at right-back in place of Adam Thompson who had suffered a family bereavement.
Thompson's father had sadly died aged 57 and in the 57th minute there was a rousing minute's applause from the 1,577-strong travelling contingent.
In the 59th minute, Rotherham finally tested Josef Bursik who was equal to Dan Barlaser's shot from Chiedozie Ogbene's pull-back.
The game exploded into life in two second-half minutes just past the hour mark.
Ladapo had only just entered proceedings when he put the visitors in front with a close-range finish on 64 minutes but Accrington were quicky level as Clark's 65th-minute scuffed shot bounced high into the net.
Richard Wood wasn't far off restoring the Millers' advantage but his header in the 75th minute was just over the bar.
A point for each side seemed the likely outcome until the crazy scenes in stoppage time when Rotherham-born Wiles found the corner of the goal right in front of the Rotherham faithful.
There was still time for Offrande Zanzala to head a golden chance over for Accrington and Matt Crooks to hit the bar with a superb curling effort for the Millers.
Accrington (4-4-2): Josef Bursik; Callum Johnson, Ross Sykes, Mark Hughes, Ajibola Alese; Jordan Clark, Seamus Conneely, Sam Finley, Joe Pritchard (Offrande Zanzala 90); Dion Charles (Colby Bishop 80), Benny Ashley-Seal (Bobby Grant 80). Subs not used: Toby Savin, Joe Maguire, Ben Barclay, Sadou Diallo.
Rotherham (4-4-2): Dan Iversen; Matt Olosunde, Michael Ihiewke, Richard Wood, Joe Mattock; Chiedozie Ogbene, Matt Crooks, Dan Barlaser, Hakeeb Adelakun (Freddie Ladapo 61); Kyle Vassell (Ben Wiles 71), Michael Smith (Josh Koroma 81). Subs not used: Lewis Price, Adam Thompson, Shaun MacDonald, Jamie Lindsay.
Goals: Ladapo 64, Wiles 90+1 (Rotherham); Clark 65 (Accrington).
Referee: Seb Stockbridge (Tyne And Wear).
Attendance: 3,447 (1,577).