Last updated on .From the section FA Cup

Everton keeper Robles & Naismith miss from spot

West Ham keeper Adrian scores winning penalty

West Ham will face Bristol City in round four

West Ham goalkeeper Adrian scored the winning penalty as his side beat Everton in a thrilling FA Cup tie.

Enner Valencia put the hosts ahead when he collected Andy Carroll's pass and shot past Toffees keeper Joel Robles.

Everton had Aiden McGeady sent off for two bookable offences, but equalised with Kevin Mirallas's fine free-kick.

Romelu Lukaku put the visitors in front after Mirallas's run, before Carlton Cole's close-range finish took the game to penalties, where West Ham won 9-8.

The third-round replay had gone to a shootout after it had finished 2-2 at the end of extra time in an amazing match.

But the drama had not finished as Everton's Steven Naismith had his penalty saved and Stewart Downing had a chance to win it for the hosts, but Robles blocked his tame effort.

However, Robles then hit the crossbar with his powerful attempt before Adrian threw off his goalkeeping gloves and calmly converted the 20th penalty to set up a fourth-round tie at League One side Bristol City.

It looked like being a routine win for the Hammers when they were leading 1-0 and Everton were reduced to 10 men with McGeady needlessly sent off after only 56 minutes.

The midfielder had been booked in the first half for a foul on Matt Jarvis before a rash sliding challenge on Mark Noble saw a second caution.

Toffees come unstuck Everton had not lost to West Ham in their previous 15 matches in all competitions

However, Roberto Martinez's side fought back and grabbed a deserved equaliser through substitute Mirallas's powerful free-kick, which curled around the wall and past Adrian.

Robles made excellent saves to deny Noble and substitute Kevin Nolan to take the game into extra time and Lukaku put Everton ahead with a close-range finish after more excellent work from Mirallas.

It was a poignant moment for Lukaku as he raised both arms and pointed to the sky, as a tribute to his friend Junior Malanda, the Belgium Under-21 international and Wolfsburg midfielder who died in a car crash in Germany on Sunday aged 20.

There was then controversy as Everton thought they should have had a penalty when Mirallas was fouled, but the referee gave a free-kick on the edge of the penalty area, despite the offence appearing to take place in it.

But there was still time for another twist as substitute Cole, who had only been on the pitch for two minutes, prodded in James Tomkins's header to take it to penalties.

Adrian proved to be the hero as he saved one spot-kick and scored the decisive one.

West Ham's victory was their first win in the competition since February 2011 and they will now play League One side Bristol City on Sunday, 25 January in a match that will be broadcast live on the BBC.

West Ham manager Sam Allardyce, speaking to BT Sport: "It was an unbelievable match, wasn't it? You can't say the FA Cup has died after that, not with that entertainment value.

"I thought today had absolutely everything a cup tie should have - a little bit of controversy, some great play, chances missed, some great goalkeeping and some very good goals."

West Ham's match-winner Adrian: "It was the most unbelievable game and for the fans I feel really happy.

"I was relaxed and quiet when I struck the penalty and we got the victory and keep going in the FA Cup."

Everton manager Roberto Martinez: "I thought we were the better side. We created really, really good opportunities, and probably we should have taken one or two before the one we scored.

"But in terms of the performance and the character and the phases of good football we showed, I couldn't be prouder.

"Sometimes in football you feel you are going to get what you deserve but clearly today we were unfortunate in the penalty shootout where it is a bit of a lottery."

Enner Valencia's goal for West Ham was his first since he scored in the 2-2 draw v Stoke on 1 November

Everton's Aiden McGeady was sent off after only 56 minutes of the match

Kevin Mirallas's free-kick had made it 1-1 after 82 minutes, despite McGeady's earlier dismissal

After scoring, Romelu Lukaku made a tribute to Belgian footballer Junior Malanda, who died on Sunday

Carlton Cole's 113th-minute goal made it 2-2 and took the tie into a penalty shootout

West ham team-mates James Tomkins (far right) and Mark Noble were involved in a disagreement late on

West Ham goalkeeper Adrian scored the winning penalty as his side beat Everton 9-8 on penalties