New Reading manager Mark Bowen saw his struggling side grab a dramatic 1-0 Sky Bet Championship win over Preston at the Madejski Stadium.
Centre-back Matt Miazga struck deep into stoppage time as the game appeared to be petering out into a goalless draw.
Victory sees the Royals move two points clear of the bottom three as they ended a winless league run dating back to August 24.
Bowen, 55, took over on Monday - his first permanent role as a manager - to replace the sacked Portuguese Jose Gomes.
Previously Reading's sporting director, he had spent most of his 20-year coaching career as No 2 to fellow former Wales international Mark Hughes.
Bowen inherited a team that were without a win in six league matches, including five defeats, under Gomes.
Preston, meanwhile, came into the match in third place in the table and were unbeaten in eight Championship games, winning five of them.
The visitors began the brighter, with full-back Andy Hughes causing problems when going forward on the left flank.
From a low Hughes cross, Tom Barkhuizen mis-controlled the ball in the six-yard area and allowed Reading goalkeeper Rafael to gather comfortably.
Preston continued to press but a dangerous free-kick from captain Paul Gallagher narrowly missed all the bodies in a crowded home area.
Reading finally got going in attack, with left-back Jordan Obita releasing striker George Puscas, but the Romania international tried an ambitious volley from a tight angle that flew over the crossbar.
John Swift then fired in a powerful 20-yard free-kick which Declan Rudd did well to tip around a post.
Preston responded when Barkhuizen set off on a mazy run along the right flank, only to finish with a weak effort at Rafael.
Pele replied for the hosts, sending in a superb low centre into the North End six-yard box. Puscas arrived to meet it but could manage only the slightest of touches and the chance went begging.
Reading upped the tempo before half-time but Rudd made solid saves to twice deny Ovie Ejaria.
Preston launched a rare attack early in the second half and should have gone in front.
Darnell Fisher crossed from the right and David Nugent, totally unmarked, nodded straight into the grasp of Rafael.
Ejaria again proved troublesome for Preston but he sliced over a clear opportunity from an Andy Yiadom centre.
But Reading snatched it at the end when Miazga followed up to net from close range after Rudd have saved from Jordan Obita.
What the managers said...
Mark Bowen: "When you get a last-gasp winner, a lot of managers - myself included - almost want to come in and say to the lads 'You've earned it, have a day off tomorrow. We'll start back on Monday'. But we can't do that, we've got catching up to do [in this league].
"Tomorrow will be a normal day as usual. We'll count up who's fit and who's not, we've got to recover right. With just one win in seven, we can't go patting ourselves on the back. We'll only do that when we get a run of results and start climbing that table."
Alex Neil: "It's hard to take but a harder one to take is when you play really well and lose. I don't think we played well enough, albeit I don't think we deserved to lose the game.
"I thought it was a poor game, to be honest. It was probably as poor as we've moved the ball. We didn't build well enough, we didn't look a threat as much as what we generally do. It was just one of those games where there was going to be the odd chance in the box and who took their opportunity when it came."