Two goals in stoppage time produced a dramatic late turnaround at Goodison Park as Everton beat Tottenham to move into fourth spot in the Premier League.
Spurs appeared to be on their way to victory courtesy of Clint Dempsey's deflected 76th-minute strike.
Gylfi Sigurdsson then hit the Toffees crossbar with a shot before Steven Pienaar header in against his former club to equalise after 90 minutes.
Moyes happy with Everton 'character'
Nikica Jelavic then turned in a close-range shot for Everton's winner.
Spurs, without the buccaneering Gareth Bale through injury, thought they had produced a classic away performance, having soaked up the home side's pressure before taking the lead through one of their rare forays forward.
But Everton had a sting in their tail and extended their unbeaten run at Goodison Park to 12 games with a late rally which saw them leapfrog their opponents into the Champions League places on goal difference.
Toffees manager David Moyes was favourite to take over at Tottenham at one point during the summer prior to Andre Villas-Boas entering the fray and taking over as boss of the White Hart Lane outfit.
The pair shared a hug before the game but, if Moyes had any point to make to the London club's hierarchy, his side certainly began with the intent and industry to try to make it for him.
Steve BowerBBC Match of the Day commentator
"David Moyes's Everton take all three points and go above Spurs and into the top four after a late turnaround. Andre-Villas Boas's team took the lead and then two dramatic late goals have won it for Everton."
Home midfielder Leon Osman had an early shot blocked after Pienaar, who returned to Goodison Park last January after a move to Spurs did not work out, cushioned a header into his path.
The visitors settled but, although Everton were looking the most dangerous, a combination of last-ditch defending, a smart save from keeper Hugo Lloris and lack of cutting edge in the final third held the home side at bay.
Lloris quickly came out of his goal to palm the ball away from the feet of Jelavic when the striker was put through on goal.
Spurs defender William Gallas also crucially intercepted a Kevin Mirallas cross in front of a waiting Jelavic, while Seamus Coleman sent an angled effort into the side-netting before Osman sent a shot across goal.
Everton also had two handball shouts against Dempsey and Gallas but neither were conclusive enough for referee Kevin Friend to award a penalty.
Spurs usually have a stylish swagger to their play but they were showing they could also put in a workmanlike performance as they frustrated their hosts.
Tottenham would be top of the Premier League if all the games had ended after 80 minutes. Spurs would have 34 points and be two points ahead of Manchester United and five ahead of Manchester City.
Toffees midfielder Steven Naismith came on after the break and he immediately had a chance. Leighton Baines fired in a shot at goal after his free-kick had come back off the Tottenham wall but Naismith side-footed the off-target effort wide from eight yards.
Everton were punished for not making the most of their possession when Dempsey's long range shot went in via a deflection off centre-back Sylvain Distin.
It was a body blow for the home side but, after Spurs substitute Sigurdsson's shot hit the crossbar, the home side showed the character and spirit they are renowned for when Pienaar powered a ferocious header in from a Seamus Coleman cross.
Spurs barely had time to reflect on the equaliser before Apostolos Vellios's overhead kick fell for Jelavic to score the winner from eight yards, with Moyes coming on to the pitch in celebration.
Everton manager David Moyes:
"It is as good a finish as we've had. We've had a few like that where we've lost and felt low so we were due one.
Villas-Boas commends Spurs effort
"The position [fourth place] doesn't shame the way the players have been playing, they have been doing that well.
"But we could quite easily have slipped out and been in the bottom half of the league. It feels good today but we have to make sure we maintain that."
Tottenham boss Andre Villas-Boas:
"It was a disappointing result bearing in mind we were leading taking the game into the last minute.
"It has been quite an adventure in the Premier League this season; if we count the number of results that have been going for us before the last minutes we would be first.
"There are so many different reasons. It is not really easy to explain because a couple of them come from different situations.
"It is something we are aware of, which is why we speak about it openly, and it is something we have to improve, seeing off games."
Full Time The referee blows for the end of the match.
90:00 +3:02 Booking
Booking The referee cautions Nikica Jelavic for unsporting behaviour.
Direct free kick taken by Sylvain Distin.
90:00 +2:56 Substitution
Substitution Johnny Heitinga comes on in place of Nikica Jelavic.
Free kick awarded for a foul by Tom Huddlestone on Nikica Jelavic.
Apostolos Vellios has an effort at goal.
Assist on the goal came from Apostolos Vellios.
90:00 +1:22 Goal scored
Goal - Nikica Jelavic - Everton 2 - 1 Tottenham Nikica Jelavic finds the back of the net with a goal from inside the area to the bottom left corner of the goal. Everton 2-1 Tottenham.
The assist for the goal came from Seamus Coleman.
89:54 Goal scored
Goal - Steven Pienaar - Everton 1 - 1 Tottenham Steven Pienaar scores a headed goal from inside the penalty area. Everton 1-1 Tottenham.
The ball is delivered by Jan Vertonghen, comfortable save by Tim Howard.
Substitution Yago Falque on for Jermain Defoe.
Gylfi Sigurdsson produces a curled right-footed shot from 20 yards.
Substitution Apostolos Vellios is brought on as a substitute for Leon Osman.
Substitution Gylfi Sigurdsson joins the action as a substitute, replacing Mousa Dembele.
Tom Huddlestone provided the assist for the goal.
75:04 Goal scored
Goal - Clint Dempsey - Everton 0 - 1 Tottenham Clint Dempsey finds the net with a goal from long range to the bottom right corner of the goal. Everton 0-1 Tottenham.
Free kick awarded for a foul by Steven Pienaar on Mousa Dembele. Free kick taken by Raniere Sandro.
Leon Osman has a drilled shot. Save by Hugo Lloris.
Marouane Fellaini has a drilled shot. Blocked by Leon Osman.
The free kick is delivered right-footed by Kyle Walker from right wing.
Booking The referee books Leon Osman for unsporting behaviour.
Leon Osman concedes a free kick for a foul on Kyle Walker.
Emmanuel Adebayor concedes a free kick for a foul on Phil Jagielka. Darron Gibson takes the free kick.
Shot on goal by Leon Osman from just inside the area goes over the target.
The ball is swung over by Seamus Coleman, save made by Hugo Lloris.
Centre by Jan Vertonghen, clearance by Phil Jagielka.
Steven Naismith challenges Clint Dempsey unfairly and gives away a free kick. Kyle Walker takes the direct free kick.
Marouane Fellaini takes a shot. Save by Hugo Lloris.
Foul by Emmanuel Adebayor on Seamus Coleman, free kick awarded. Direct free kick taken by Darron Gibson.
Centre by Aaron Lennon, blocked by Leighton Baines.
Corner taken right-footed by Kyle Walker to the near post, Nikica Jelavic manages to make a clearance.
Free kick awarded for an unfair challenge on Clint Dempsey by Darron Gibson. Aaron Lennon takes the direct free kick. Drilled left-footed shot by Jan Vertonghen. Save made by Tim Howard.
William Gallas has an effort at goal. Steven Naismith gets a block in. Inswinging corner taken from the left by-line by Kyle Walker.
Inswinging corner taken by Kyle Walker, clearance by Darron Gibson.
Raniere Sandro takes a shot. Blocked by Sylvain Distin.
Unfair challenge on Mousa Dembele by Marouane Fellaini results in a free kick. William Gallas restarts play with the free kick.
Nikica Jelavic takes a shot. Blocked by William Gallas.
Free kick awarded for an unfair challenge on Leon Osman by Raniere Sandro. Leighton Baines produces a shot on goal direct from the free kick. Close range shot by Steven Naismith goes wide of the right-hand upright.
Substitution Steven Naismith comes on in place of Kevin Mirallas.
The referee starts the second half.
Substitution Steven Naismith comes on in place of Kevin Mirallas.
Leon Osman takes a shot. Hugo Lloris makes a save. Corner taken by Leighton Baines.
Kevin Mirallas takes a shot. Kyle Walker gets a block in.
Kevin Mirallas takes a shot. Blocked by Steven Caulker.
Free kick awarded for an unfair challenge on Steven Pienaar by Raniere Sandro. Leon Osman restarts play with the free kick.
Kyle Walker restarts play with the free kick.
Raniere Sandro takes the free kick.
Booking Leighton Baines is given a yellow card.
Leighton Baines challenges Aaron Lennon unfairly and gives away a free kick.
A cross is delivered by Leon Osman.
The free kick is delivered right-footed by Darron Gibson from right wing, Steven Caulker manages to make a clearance.
Booking Caution for Jan Vertonghen.
Jan Vertonghen challenges Seamus Coleman unfairly and gives away a free kick.
Unfair challenge on Leon Osman by Raniere Sandro results in a free kick. Leon Osman restarts play with the free kick.
Free kick crossed left-footed by Leighton Baines, William Gallas manages to make a clearance.
Booking Jermain Defoe receives a caution.
Raniere Sandro challenges Marouane Fellaini unfairly and gives away a free kick.
Seamus Coleman sends in a cross, clearance made by Raniere Sandro.
Kevin Mirallas produces a drilled right-footed shot from 25 yards. William Gallas gets a block in.
Outswinging corner taken right-footed by Steven Pienaar from the right by-line to the near post, Header from deep inside the penalty area by Marouane Fellaini goes harmlessly over the crossbar.
Free kick awarded for a foul by Nikica Jelavic on Mousa Dembele. Jan Vertonghen restarts play with the free kick.
Steven Pienaar has an effort at goal from outside the penalty box missing to the wide left of the goal.
Unfair challenge on Raniere Sandro by Leon Osman results in a free kick. Steven Caulker takes the direct free kick.
A cross is delivered by Kyle Walker, Darron Gibson makes a clearance.
Outswinging corner taken right-footed by Kyle Walker, Darron Gibson makes a clearance.
Jermain Defoe has an effort at goal from 20 yards. Blocked by Leon Osman.
Darron Gibson produces a right-footed shot from long range which goes wide right of the goal.
Outswinging corner taken left-footed by Leighton Baines from the left by-line, Emmanuel Adebayor manages to make a clearance.
The referee blows for offside. Raniere Sandro takes the free kick.
Darron Gibson gives away a free kick for an unfair challenge on Clint Dempsey. Clint Dempsey has an effort direct from the free kick, Tim Howard makes a comfortable save.
Seamus Coleman is penalised for handball and concedes a free kick. Hugo Lloris takes the free kick.
Free kick awarded for an unfair challenge on Mousa Dembele by Marouane Fellaini. Hugo Lloris takes the free kick.
Outswinging corner taken by Kevin Mirallas from the right by-line.
Kyle Walker delivers the ball, clearance made by Sylvain Distin. Mousa Dembele produces a drilled left-footed shot from 25 yards. Save by Tim Howard.
The ball is crossed by Jan Vertonghen, clearance by Phil Jagielka.
Handball decision goes against Darron Gibson. Direct free kick taken by Clint Dempsey.
Leon Osman takes a shot. Blocked by William Gallas.
Leon Osman takes a shot. Steven Caulker gets a block in.
Unfair challenge on Nikica Jelavic by Raniere Sandro results in a free kick. Leon Osman takes the free kick.
The ref blows the whistle to start the match.
Live text and data provided by The Press Association
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.