Aston Villa 1-2 Chelsea
Frank Lampard scored twice to become Chelsea's all-time leading scorer as the Blues came from behind to win at relegation-threatened Aston Villa.
Christian Benteke put Villa ahead with a strong run and finish, while Chelsea had Ramires sent off before half-time.
After the break Benteke saw a red card and Lampard fired his side level.
The midfielder then collected his 203rd Blues goal to break Bobby Tambling's record and all but secure their place in next season's Champions League.
Chelsea sit third in the table with one game left and only an unlikely mathematical scenario can deny them a top-four place.
Arsenal could end up above them and Tottenham can finish on the same points, but Chelsea's goal difference is 17 better than that of Spurs.
Although the result leaves Villa five points clear of the relegation zone in 13th, they have played a game more than every team beneath them.
Paul Lambert's side will feel hard done by, but Lampard's intervention sums up the impact he has made throughout his career as he exploited a defence that has now gone 21 league games without a clean sheet.
For so long it seemed Villa were heading for a sixth win nine matches to secure survival, their newfound confidence clear for all to see.
They were at Stamford Bridge, but there was no sign of scars from that humbling as a youthful and well-organised line-up attacked with pace and power.
Benteke opened the scoring when he met Brad Guzan's long ball forward with a touch to Yacouba Sylla, took the return pass, ghosted past Gary Cahill and planted an assured finish past Petr Cech at the near post.
It was the Belgian's 19th goal of an impressive debut Premier League season and his 23rd in all competitions.
Villa Park was rocking and the noise level rose again when Fabian Delph rifled narrowly off target before, in the 19th minute, applause rang out for newly retired captain Stiliyan Petrov, who has been forced to quit the game as he continues his battle with leukaemia.
Chelsea worked hard to restore parity - Guzan denied Demba Ba when one-on-one and pushed Lampard's free-kick on to a post - but Villa held firm and their prospects improved when the visitors had Ramires sent off.
The Brazilian had already been cautioned for a challenge on Benteke when he caught Gabriel Agbonlahor with a high foot.
That saw the momentum swing towards Villa and they dominated the start of the second half, with an Agbonlahor-led counter-attack setting the tone before both he and Joe Bennett went close to doubling the lead.
But the hosts' progress faltered as Benteke, booked for catching Cesar Azpilicueta with his elbow in the first half, was shown a second yellow card for a high foot that connected with John Terry.
Two minutes later, Eden Hazard found Lampard and he produced a fizzing left-foot finish that left Guzan with no chance.
Chelsea pressed for the winner and Cahill's strike was stopped on the line by Sylla, and although TV replays showed Ba's follow up may have crossed the line it was not given and Ashley Westwood cleared.
Terry - and later Hazard - went off injured, a worry for Rafael Benitez ahead of Wednesday's Europa League final.
But the Blues were left celebrating after Lampard rounded off a brilliant late move with the goal that rewrites the record books.
Aston Villa manager Paul Lambert: "We should have won the game. I thought we looked great and played good football, we had a good tempo. Some of the decisions today were bizarre. The referee missed the John Terry one, he's taken down Yacouba Sylla. You've got to be big enough to make that decision.
"We were so far in control of that game. We didn't deserve that - we were excellent.
"I thought we should have had a penalty. There were so many decisions that were poor."
Chelsea manager Rafael Benitez: "It [all but qualifying for the Champions League] was a great achievement. With a lot of games we have played, it was difficult but we did well.
"It was a dramatic game. The sending-off for us was a big problem. We had to change our game plan at 11 v 10. When Christian Benteke was sent off it made a difference.
"We have to wait and see how the injured players are. John Terry has twisted his ankle and we have to wait for a scan. Hazard hurt his hamstring and we will have to wait and see."