Rotherham secured Championship safety with a game to spare as Hakeem Odoffin's goal proved enough to beat 10-man Middlesbrough at New York Stadium.
Play-off-bound Boro lost full-back Anfernee Dijksteel to a straight red card in stoppage time of a scrappy first half for bringing down Jordan Hugill on the edge of the box.
And moments after the break Odoffin sparked jubilation among the home supporters when he lashed a 20-yard shot into the bottom corner of the net.
The result leaves Rotherham five points clear of the bottom three, while third-bottom Reading will now need Huddersfield to lose against Sheffield United on Thursday and then beat the Terriers themselves on the final day to avoid relegation.