Rotherham's hopes of all but guaranteeing an automatic promotion place were dashed in remarkable fashion as Michael Ihiekwe's 88th-minute own goal resulted in a 1-1 draw at Sunderland.
Having opened the scoring from a corner at the other end in the first half, Ihiekwe arrowed a header into his own net as he attempted to deal with Jack Clarke's cross. The result means Rotherham are one point clear of third-placed MK Dons ahead of the final weekend.
Sunderland are one point clear of seventh-placed Wycombe, meaning their play-off position is not yet guaranteed ahead of their final day trip to Morecambe.
Rotherham went into the game knowing a win would all but guarantee them a top-two finish, and the Millers started like a side determined to prevent a nervy final weekend.
They opened the scoring 17 minutes in, with Ihiekwe rising unopposed to power home a header from Dan Barlaser's corner.
Ben Wiles almost added a second goal with a shot that whistled just wide of the post, and Rotherham's first-half dominance was further underlined when Jordi Osei-Tutu wriggled into space on the edge of the area, only to drag his low shot just past the upright.
Corry Evans fired a shot over at the start of the second half as Sunderland briefly threatened, but the Millers would have doubled their lead shortly after the hour mark had Richard Wood not directed a thumping header straight at Black Cats goalkeeper Anthony Patterson.
It proved a crucial miss as Ihiekwe's late own goal ensured his side were pegged back. The defender had plenty of time to deal with Clarke's centre, but fired an unstoppable header into the roof of his own net.