Reading halted a six-match Sky Bet Championship run without a win as they edged past relegation-threatened Rotherham 2-1 at the SCL Stadium.
Though the Royals had the better of the opening exchanges, Rotherham went in front in the 37th minute through a rare goal from veteran defender Lee Peltier.
Andy Carroll levelled with a powerful header early in the second half and substitute Tyrese Fornah nodded in a dramatic 90th-minute winner.
Reading had been in poor form since early October, managing just four league victories in 19 outings and last winning in the second tier in the 2-1 home success over Swansea on December 27.
Rotherham had been similarly struggling, with two wins in 16 Championship games leaving them four points off the relegation zone.
However, going into the game in Berkshire they were unbeaten in four in the league – including draws in their past three matches.
Carroll sent a weak header at Millers goalkeeper Viktor Johansson and Jeff Hendrick then saw a powerful shot blocked by the visitors’ massed defence in a bright start for the Royals.
As Reading kept up the pressure, a well-struck effort from skipper Andy Yiadom was deflected past Johansson but narrowly wide.
Rotherham gradually eased their way into the game, mostly through the tireless running of winger Tariqe Fosu-Henry – a former Reading academy graduate.
And as Reading’s early promise faded, the Millers almost took the lead just past the half-hour mark when a Peltier volley skimmed the top of the crossbar.
But the 36-year-old right-back enjoyed better fortune eight minutes from the break, heading home superbly from a deep Conor Coventry free-kick.
It was Peltier’s first goal for nine years, scored when he was playing for Leeds.
Though booed off by their fans at the interval, Reading responded positively and were level within seven minutes of the restart.
Half-time substitute Femi Azeez sent over a free-kick from the right and former England striker Carroll thundered home a header for his fifth goal of the campaign.
Rotherham were quick to recover, with Ollie Rathbone seeing a shot blocked, but they almost went behind shortly afterwards when Azeez scampered clear.
But with team-mate Tom Ince better placed, Azeez selfishly chose the wrong option – and Johansson saved well from his fiercely-struck attempt to the near post.
Rotherham battled hard to regain their lead but were undone in the last minute when Carroll headed on an Azeez corner for Fornah to nod in from close range.