Fulham won at home for the first time since April by punishing a wasteful Everton in the Capital One Cup.
The visitors took the lead when forward Gerard Deulofeu threaded the ball to Steven Naismith who found the net.
Barcelona loanee Deulofeu created several chances but Dimitar Berbatov equalised from close-range.
Substitute Darren Bent then collected a Giorgos Karagounis free-kick after 68 minutes and fired in to end Everton's unbeaten start to the season.
Victory for Martin Jol's side was their third of the season and offers some relief for the Dutch manager, whose team had lost five and drawn one of their previous six home games.
Roberto Martinez's first defeat as Everton boss looked unlikely after his side dominated the first half and they took a well-deserved lead through Naismith after 12 minutes.
Romelu Lukaku and the excellent Deulofeu kept Everton on top, but they could not find a second despite a host of first-half opportunities.
Berbatov, who returned from injury, levelled with his first of the season nine minutes after the break.
And Bent then wrapped the win up in front of England manager Roy Hodgson less than three minutes after his introduction from the bench.
Only 10 days after some Fulham fans chanted "Jol out" following a 1-1 draw with West Brom, the home supporters cheered their team off at the end as Fulham reached the fourth round for the first time since 2004.
Fulham boss Martin Jol: "It's a big relief. It was a long time ago since our last win against Sunderland [on 17 August], and today we wanted to get back to winning ways.
"It has not been easy, but in the second half with Dimitar Berbatov and Darren Bent there was enough goals and if there is enough goals we can win."
Everton manager Roberto Martinez on Gerard Deulofeu: "He's a real threat. His play deserved more goals in the first half, and that would have been the difference.
"Overall we had two or three great opportunities, but couldn't take advantage so that's a disappointment.
"We lacked a bit of composure in the final third and that cost us. There are many things we need to learn from it."