Wolves edged out Middlesbrough to claim a priceless victory in their fight for Championship survival.
Stephen McManus put into his own net to give the home side the lead before Grant Leadbitter equalised when his effort struck the underside of the bar and crept in.
Wolves made it 2-1 when Bjorn Sigurdarson slotted home but Leadbitter levelled again with a great strike.
With 20 minutes remaining, Kevin Doyle headed in what proved to be the winner.
The result moves Wolves up to 22nd, level on 45 points with 21st-placed Peterborough, who also won.
Defeat, though, was a blow to Middlesbrough's play-off hopes. Tony Mowbray's side are now six points shy of sixth-placed Brighton.
Wolves were on the back foot early in the match, although it was home defender Kaspars Gorkss, instead of a Boro player, who forced home goalkeeper Dorus De Vries into making the first good save.
Boro hit the bar a total of four times in the first half, courtesy of efforts from Justin Hoyte, Leadbitter (twice) and Mustapha Carayol.
After full-back Hoyte rattled the bar with a powerful strike, Wolves took the lead when Stephen Hunt's low cross was turned in by McManus.
A few moments later Boro equalised when Leadbitter struck the post with a shot then followed up with a strike that rebounded against the underside of the crossbar and was judged to have crossed the line.
Carayol came close to giving the visitors the lead when a superb effort that was palmed on to the bar by De Vries.
Wolves re-took the lead after the break when Sylvan Ebanks-Blake's backheel found Sigurdarson, who eased past keeper Jason Steele before tapping in.
But Mowbray's men levelled once more when Leadbitter smashed in a tremendous 25-yard strike that found the bottom corner.
With less than a quarter of the match left to play, Doyle rounded off the scoring when he nodded in Roger Johnson's flick-on from Matt Doherty's throw-in.
Wolves manager Dean Saunders [on Grant Leadbitter's first goal]:
"The ball was not over the line. The assistant referee was seven yards out when he gave it and he was not in line with the goal.
"I can't understand why he gave it. He is just guessing. Don't give it if you aren't sure.
"All the players knew at half-time that it was not over the line but they have shown some great character after they have had a punch from the officials."
Middlesbrough manager Tony Mowbray:
"I stopped looking at the table in my mind a few weeks ago. We just have to win football matches. If we win games let's see where the season takes us. But obviously we are finding it difficult to matches at the moment.
"Yet if we had won at Derby County on New Year's Day we could have gone top of the table and that is the stark reality of our position.
"Confidence does get eroded with defeats and yet the defeats probably come along because you don't have key players available.
"I felt that we gave Wolves a tough game but the reality is that we did not get any points."