Huddersfield took a huge step towards Sky Bet Championship safety with a 2-1 win at Cardiff.
Substitute Joseph Hungbo struck a powerful opener and Jack Simpson’s own goal secured Huddersfield a three-point buffer between themselves and the relegation zone.
Cardiff replied through Isaak Davies’ first goal of the season seven minutes from time and the Terriers held on to the three points when Lee Nicholls saved superbly from Rubin Colwill.
A draw on the final day at home to 22nd-placed Reading will be enough to keep Huddersfield up, although Neil Warnock’s side could guarantee their Championship status by avoiding defeat to promoted Sheffield United on Thursday.
Warnock was back on familiar ground having won a record eighth promotion at Cardiff in 2018 during a three-year stay in south Wales.
The 74-year-old came out of retirement in February with Huddersfield in 23rd place and just one point off the bottom of the table.
Cardiff could relax after their Championship status was confirmed on Saturday by Reading’s failure to beat Wigan.
Sabri Lamouchi has gradually improved the Bluebirds’ fortunes since his January appointment, with Sory Kaba largely responsible for their late-season flourish.
Kaba was rested to the bench after seven goals in 10 games, but the Guinean was introduced as early as the 13th minute in the Welsh capital as Kion Etete limped off.
It was not a welcome sight for the visitors, who had started well in the Cardiff drizzle.
Danny Ward, who played under Warnock during his three years at Cardiff, almost marked his return with a second-minute shot that Jak Alnwick pushed out at his near post.
Huddersfield attacks were also thwarted by brave blocks from Cedric Kipre and Mahlon Romeo as Cardiff struggled to fashion chances.
Romaine Sawyers blazed over from the edge of the box before the Terriers were almost undone after 39 minutes by a one-two between Jaden Philogene and Kaba.
Philogene raced in on advancing Huddersfield goalkeeper Lee Nicholls but lifted the ball into the side-netting.
Openings were just as scarce after the interval until Sawyers lost possession under pressure after 61 minutes.
Hungbo, on loan from Watford, pounced on the loose ball and cut inside Kipre to fire a vicious shot past Alnwick.
Huddersfield doubled their advantage eight minutes later as Jack Rudoni’s free-kick flicked off the head of Ryan Wintle to reach the far post.
Matty Pearson had timed his run perfectly but his header looked as if it was travelling wide before striking the foot of Simpson and giving Alnwick no chance.
The woodwork twice denied Huddersfield another goal as Josh Koroma hit a post before Jaheim Headley planted the rebound against the crossbar from just a few feet out.
Davies gave Cardiff hope with a clever back-heel from Romeo’s cross, but Huddersfield were not to be denied.