Bryan Mbeumo came off the bench to snatch a late winner as 10-man Brentford beat promotion rivals Bournemouth 1-0 to seal their place in the play-offs.
Mbeumo's goal 13 minutes from time was enough to earn Brentford only their second win in eight games despite the sending off of captain Pontus Jansson early in the second half.
Bournemouth, looking for a club-record-equalling eighth straight league win, lacked their usual attacking spark and managed only one shot on target.
The Cherries, needing only a point to guarantee their play-off place, made four changes, with former England midfielder Jack Wilshere among those brought in.
Brentford, whose recent run of six draws in seven games had put paid to their automatic promotion hopes, recalled the fit-again Sergi Canos in place of Mbeumo.
Bournemouth started brightly and Junior Stanislas had the first big chance of the game inside the first five minutes.
Arnaut Danjuma crossed from the left to the unmarked Stanislas but he lost his footing under pressure from the sliding Ethan Pinnock and sliced his shot tamely wide.
The home side had a let-off in the 13th minute when Canos' close-range effort from a Marcus Forss knockdown was cleared off the line by Steve Cook.
Nine minutes later goalkeeper Asmir Begovic did well to claw Mathias Jensen's low shot through a crowded penalty area behind for a corner.
The best chance of the first half came 14 minutes before half-time and Brentford's top-scorer Ivan Toney should have fired the Bees in front.
Vitaly Janelt's ball over the top forced a slip from Bournemouth captain Cook, allowing Toney to race clean through on goal but he put a weak shot straight at Begovic.
Centre-back Cook redeemed himself for the error soon after by bravely blocking Canos' goalbound curler behind for a corner.
The frustrated Toney had two more good openings before half-time, first in the 43rd minute he blazed a cross-cum-shot harmlessly across the face of goal after being slid through by Jensen.
Then two minutes later Toney flashed a left-footed half volley inches wide of the far post after plucking another Jensen pass from the sky.
The only surprise was that the two highest scoring teams in the Sky Bet Championship went in with the score locked at 0-0 at the break.
Brentford started the second half well with Canos shooting wide with a snap shot.
Their hopes of victory suffered a major setback when Jansson was cheaply dismissed five minutes after the restart for wrestling Danjuma to the ground.
Despite their numerical disadvantage, the Bees continued to look the more likely to break the deadlock and Forss blazed over after latching onto Cook's poor back header.
Thomas Frank bravely sent on striker Mbeumo for the final stages and that change paid off when the Frenchman grabbed the winner.
Begovic could only parry Toney's initial shot and Mbeumo was on hand to slam home the rebound from six yards.