West Brom's automatic promotion hopes took a hammer blow as they were beaten 2-1 by Huddersfield at the John Smith's Stadium.
The surprise defeat ensured Leeds were promoted to the Premier League, but also opens the door for Brentford to replace them in the Championship top-two should they beat or draw against Stoke at the Bet365 Stadium on Saturday.
A fast start from Danny Cowley's men brought the first goal after four minutes, when Chris Willock hooked in from close-range, but Dara O'Shea levelled as the visitors ended the first half in the ascendancy, though there was more than a hint of offside in the build-up.
A well-organised Huddersfield kept their opponents at bay and struck a late winner four minutes from time, when Arsenal loanee Emile Smith Rowe slipped the ball past Sam Johnstone to seal victory.
The result leaves Slaven Bilic's men just a point clear of third-placed Brentford, while the Terriers move onto 51 points, which leaves them six points clear of the relegation zone.
West Brom surrender control in top-two race
After two draws in succession, it appeared that West Brom were starting to buckle under the pressure of achieving the automatic promotion that had looked a formality for so many months and the anxiety was evident after just four minutes when Huddersfield took a surprise lead.
A needless free-kick was conceded by O'Shea on the left-hand side of the penalty area, and after goalkeeper Johnstone only managed to get a foot on Juninho Bacuna's low delivery, former Arsenal trainee Willock pounced quickly to steer over the line.
There were fleeting glimpses of the Baggies' free-flowing style, but the best openings against a side camped in their own half came through free-kicks from deep that were often easily dealt with. One of said deliveries created the equaliser, though it came in controversial circumstances.
Matheus Pereira whipped a free-kick into the box from the right flank, with O'Shea atoning for his earlier mistake by heading in after Jonas Lossl had pushed the ball straight into his path. Cowley raced from the dugout as the goal was awarded as it appeared that both Grady Diangana and O'Shea had strayed offside in the build-up.
There were several heart-in-mouth moments after the break. Lossl saved a wicked strike from Pereira, before the Brazilian headed the rebound over the bar, and then substitute Callum Robinson saw a shot held inside the penalty area.
But it was the hosts who had the final say. A scintillating run through the middle of the park from Lewis O'Brien allowed the midfielder to slide the ball to Arsenal loanee Smith Rowe, who tucked home to spark wild celebrations across west Yorkshire.
Man of the match - Lewis O'Brien
Often under-appreciated, the young midfielder produced another of the all-action performances that have caught the eye in his break-out campaign. He made six tackles, gave away only two fouls and then, as the final whistle approached, delivered a superb assist for Smith Rowe's winner.
What the managers said...
Huddersfield's Danny Cowley: "I don't know if this is a celebration, just relief. For me, I don't think we should be celebrating not getting relegated, but I'm proud of the efforts of the players. A week is a long, long time in football. This time last week we let ourselves down unfortunately, and it's definitely kept me up at nights this week, but we had to respond to that.
"No one really knows how hard it's been and where it was when we picked it up. Without doubt it's been the toughest job that I've ever done. It was our aim to get 50 points and we've been able to do that and I'm very proud we've been able
to deliver that."
West Brom's Slaven Bilic: "It is hard to find the words to describe it. I didn't see it coming. We simply weren't good enough. We were poor in everything. We can give credit to them also because they felt the pressure, it was big pressure for them, they were fighting for their lives so from the outside it looked like they wanted it more, which isn't the case.
"We crumbled under the pressure. Why we've done it, I really don't know. I tried to ease the pressure, to make them cope with the pressure but it obviously wasn't good enough.
"At the end of the day we have two options: one is to pack up and feel sorry for ourselves and cry or we can have another route, a more difficult route, to use this second chance and thank God we have it. There are only a few games now but we have to fight, to show we are proper men, a proper team and proper characters."
Both sides are next in action on the final day of the Championship season on Wednesday July 22. Huddersfield travel to The Den to face Millwall, while West Brom host QPR at The Hawthorns. Both fixtures get under way at 7.30pm.