Louis Saha scored twice as Everton came from behind against 10-man West Ham to end the visitors' Europa League hopes.
Radoslav Kovac's 30-yard rocket had put West Ham ahead but a red card for James Tomkins changed the game's destiny.
Tomkins was sent off for tripping Tim Cahill and Saha tucked away the resulting penalty with aplomb.
After the break Joseph Yobo made it 2-1 with a rifled shot, Saha hit the post with a header, but a close-range shot gave the Frenchman his second goal.
West Ham had arrived on Merseyside hoping to take a major step towards following Everton into the Europa League, but found the home side in no mood to help out.
A series of dangerous raids from Leighton Baines soon had the Hammers rearguard chasing back towards their own goal before Steven Pienaar's spectacular long-range effort singed the bar with Robert Green beaten.
Everton's dominance continued as Marouane Fellaini's knockdown gave Leon Osman a clear sight of goal but the midfielder swung awkwardly at a bobbling ball and sliced wide.
Starved of possession, West Ham were restricted to launching long balls forward and almost had some success as Diego Tristan narrowly failed to control a pass over his shoulder.
That promised better things to come and sure enough West Ham took the lead with their first attempt on goal with Kovac's superb strike.
Saha double strike impresses Moyes
The Czech midfielder casually advanced towards the Everton goal before launching a swerving 35-yard strike that sped into Tim Howard's bottom corner.
Just as they fell behind out of the blue, Everton found themselves back in the game courtesy of Tomkins' dismissal
Cahill was sent sprawling by the West Ham defender's instinctive lunge and referee Phil Dowd duly brandished a red card and pointed to the spot.
Green stood in the right half of his goal to put off Saha, but the Frenchman remained cool and confidently tucked home.
Kovac was forced back into defence as West Ham regrouped, but inside two minutes of the restart David Moyes' side were ahead.
Some flimsy defending allowed a deep corner kick to find an unattended Yobo at the far post, and the defender coolly controlled before driving hard and low through the legs of Matthew Upson and into the far corner.
Sending-off turned game round - Zola
And West Ham's resistance was crushed with a beautifully crafted third.
Pienaar dropped a shoulder to go past Jonathan Spector and after reaching the byeline the South African squared for Saha to sidefoot home.
Everton were determined to sign off in style in front of their home support and Saha squandered a fine opportunity to pick up his hat-trick seconds before Cahill's header was scooped away by an alert Green.
After the final whistle, injured captain Phil Jagielka, complete with crutches, joined a lap of the pitch as they bade their supporters farewell and West Ham saw their European hopes wither.
Everton manager David Moyes: "If you had given me sixth at the start of the season I would have said thanks very much. If we can stay fifth I will be more than happy.
"I thought we were really good for the first 20 minutes, then we went a goal behind against the run of play. We showed great character to come back and do the job.
"The penalty and the sending off were a double whammy for West Ham. It was difficult for them but I don't think you can doubt we played very well first half.
"Patience was always going to be the key as West Ham tried to hit us on the counter."
West Ham manager Gianfranco Zola: "The players are very disappointed. But I am even more disappointed we have not been able to make seventh place.
"I am really pleased and proud to be their manager. Considering all the problems that were around the club, all the injuries we had, the players have done a fantastic job.
"I have promised them that next season we will be much better. I do believe that."
Bookmark with:
What are these?