Nouha Dicko scored Wolves' winner as they guaranteed Championship survival with a surprise 1-0 win over Leeds.
Dicko latched onto Ben Marshall's superb pass to beat Robert Green and put Wolves deservedly in front just before half time.
Leeds came on strong after the break but a brilliant defensive display ensured victory - and Blackburn's draw with Bristol City meant Wolves were mathematically safe.
You just can't predict anything this season can you?
Wolves have beaten Liverpool and Stoke City, blitzed an excellent Fulham team, won away at Newcastle and recently won five on the spin in 2016/17, writes Tim Spiers at Elland Road.
They've also lost twice to Wigan, been brushed aside by Bristol City, defeated by Burton Albion and also endured a six-game losing streak.
Everything pointed to a Leeds win here. Wolves spent their last two games on the beach and Leeds - winners in 14 of 21 home games this season - desperately required victory.
But Wolves were deserved winners. They took the game to Leeds in the first half, created numerous chances and deservedly led at the break. Lambert's 4-4-2 game plan worked perfectly and, unlike on Friday or indeed last Saturday, nobody had an off day.
They were on it, they were committed and they were disciplined.
Leeds, as expected, lobbed the kitchen sink at them in the second half but they held firm, to the extent that Andy Lonergan was only seriously tested once, mostly thanks to a magnificent collective defensive performance, with the recalled Mike Williamson and Richard Stearman both outstanding.
And it all meant, after some growing concerns of being sucked towards the bottom three in the last week, that safety was mathematically secured.
Lambert deserves plenty of credit. And it bodes well for next season that he certainly knows how to plan and enact a game plan away from home. That's been evident on a number of occasions in recent months.
The Wolves boss made four changes from the team that lost 2-0 to Brighton on Good Friday.
The injured Danny Batth and Ivan Cavaleiro missed out, while Kortney Hause and Jon Dadi Bodvarsson dropped to the bench.
In came a new centre half pairing in Richard Stearman and Mike Williamson, plus George Saville and Nouha Dicko, with David Edwards skipper on his 300th appearance for the club.
Leeds went into the game needing the points to help their play-off prospects, while Wolves had looked on the beach for their last matches, both defeats.
But the form book was turned on its head in the first half, which Wolves dominated in terms of chances.
In contrast to Friday's poor midfield showing against Brighton, Wolves were terrier-like and regularly won back possession in the Leeds half, with Marshall, Saiss, Edwards and Saville all playing well in a 4-4-2 formation.
The back four, again in contrast to Friday, were solid and dependable. Coady looked unbeatable down the Leeds left and did his fair share going forward, while Williamson, Stearman and Doherty all made important blocks and interception.
Indeed, it was one of the best halves of Wolves' infuriatingly inconsistent season and the 1-0 half time scoreline flattered the hosts.
Weimann, who partnered Dicko up top but often drifted to the right, should have given them an early lead when played in by Saiss, but shot too close to the keeper in a spurned chance reminiscent of Dicko's at Bristol City.
Then, Wolves soon folded, but here they grew more determined with Edwards, Saville and Dicko all getting decent opportunities, before Dicko broke the deadlock when smartly beating Green from a wonderful Marshall through ball.
There were moments for Leeds at the other end, but a frustrated home crowd were given very little to cheer.
At half time, with Fulham and Sheffield Wednesday winning, Leeds were being dumped out of the top six and it was no surprise they started to lay siege to Lonergan's goal after a half-time rollocking from Garry Monk, no doubt.
The keeper was fortunate when his clearance was charged down by Chris Wood but deflected to safety, and then Leeds had a huge penalty appeal turned down when Stearman was claimed to have handled Wood's cross. Jansson headed a corner over the bar as Wolves struggled to cope.
Lambert reacted with a double change on 68 minutes, sending on Bodvarsson and Lee Evans for Saville and goalscorer Dicko.
And there was then a period respite for Wolves who began to get hold of the ball in midfield and won a couple of corners.
But back came Leeds - Doukara's header was brilliantly tipped over by Lonergan in his first real save of the afternoon.
It was his first save as the magnificent Williamson and Stearman had repelled almost everything being thrown into the Wolves blocks with a succession of sliding clearances, headers and interceptions.
That continued in the dying minutes. Kortney Hause was added to the fray and did more than his fair share, with Leeds chucking the ball in the box but Wolves holding firm to pull of an unexpected and very welcome victory.
16 - Wonderful early chance. Saville wins the ball back and plays to Saiss - he slips in Weimann as a Leeds defender slips. The Austrian is through on goal but shoots too close to Robert Green.
30 - Dicko moves the ball onto his left foot and whistles an excellent attempt inches wide from 20 yards.
39 - GOAL - Marshall moves forward from halfway and spots a great run from Dicko - his sublime pass splits the Leeds defence and Dicko beats Green first-time from 15 yards.
72 - Lonergan tips over Doukara's goalbound header as Leeds pile on the pressure.
Leeds United (4-2-3-1): Green; Ayling, Bartley, Jansson, Beradi (Taylor, 63); Bridcutt (Sacko, 56), Phillips; Roofe, Hernandez, Pedraza (Doukara, 72); Wood. Subs: Peacock-Farrell, O'Kane, Dallas, Taylor, Coyle.
Wolves (4-4-2): Lonergan; Coady, Williamson, Stearman, Doherty; Marshall (Hause, 85), Edwards (c), Saiss, Saville (Evans, 68); Weimann, Dicko (Bodvarsson, 68). Subs: Burgoyne, Iorfa, Price, Gibbs-White.
Goal: Dicko (39)
Referee: Jeremy Simpson (Lancashire)
Position in the table
16th (54 points from 42 matches)Subscribe to our Newsletter