In the end the gloves came off, and Adrian delivered the knockout blow. West Ham and their charismatic goalkeeper are up for the FA Cup. After two games and 210 minutes, a sending-off and 20 penalties, three of which were missed, Sam Allardyce and his team have been rewarded with place in the fourth round and a trip to Ashton Gate to play Bristol City, second in League One, at the end of the month. They can think about that later. VIDEO Scroll down for Sportsmail's Head to Head: Enner Valencia vs Romelu Lukaku . Keeper Adrian scored the winning spot kick in the 9-8 penalty shootout to send West Ham through to the FA Cup fourth round . Enner Valencia opened the scoring for West Ham after being played through by Andy Carroll in the second half . Everton winger Aiden McGeady (centre) was sent off early in the second half for a second bookable offence . Substitute Kevin Mirallas gave Everton a lifeline with a superbly struck late free-kick that left the West Ham keeper with no chance . Romelu Lukaku reaches for the skies after giving 10-men Everton the lead in extra-time following excellent work from Mirallas . Substitute Carlton Cole (right) came on to equalise for the Hammers in extra-time and send the game into a penalty shootout . West Ham (4-1-2-1-2): Adrian 8, Jenkinson 6, Tomkins 6, Collins 7.5 (Cole 6.5, 111'), Cresswell 6.5, Noble 6.5, Song 6 (Nolan 6, 16'), Downing 6, Valencia 7, Carroll 7, Jarvis 5.5 (Amalfitano 6, 96'). Subs: Vaz Te, O'Brien, Jaaskelainen, Burke. Booked: Nolan . Goals: Valencia 56', Cole 113' Everton: Robles 7, Coleman 6, Jagielka 6, Stones 5, Baines 6, Besic 5.5 (Mirallas 6, 77'), Barry 5.5, McGeady 4, Naismith 6, Barkley 6 (Oviedo 6, 76), Lukaku 7. Subs: Kone, Garbutt, Alcaraz, McAleny, Griffiths. Booked: McGeady (red), Mirallas, Barry, Robles . Goals: Mirallas 82', Lukaku 97' Referee: Neil Swarbrick . Ratings by Sam Cunningham at Upton Park . Wembley, along with the memories of 1964, 1975 and 1980 is a still long way off, not that you would know it by the way West Ham’s players celebrated this incredible night at Upton Park. When Adrian smashed the decisive spot-kick past his opposite number Joel Robles, he set off on the predictable celebration by a corner flag where his West Ham team-mates finally caught up with him. They have put a smile back on the face of the FA Cup. Sometimes you have to say to hell with the quality and think about the drama at a game like this. West Ham fans were lapping it up. They could easily have gone out after the introduction of Kevin Mirallas, who was thrown on in the 67th minute to save this game for Everton when they were down to 10 men. He almost turned match-winner, scoring a magnificent curling equaliser after 82 minutes and then drawing a massive circle inside the West Ham penalty area to supply Romelu Lukaku seven minutes into extra-time. The Belgian forward scored and then it was all about survival for Roberto Martinez and his Everton team. They almost made it over the line but Andy Carroll’s contribution to this third-round victory should not be underestimated. The big man set up the Hammers’ opening goal after 51 minutes with a teasing through ball for Enner Valencia to scramble beyond Everton keeper Robles. When Martinez’s team went down to 10 they looked done. Aiden McGeady, their most creative player in the first half, was the one dismissed after bringing down Mark Noble in the 56th minute and earning a second yellow. West Ham attacking coach Teddy Sheringham (right) watches as Alex Song practices his shooting ahead of the game . Roberto Martinez (left) and Sam Allardyce speak before the game after the Hammers boss accused his counterpart of not being flexible . West Ham striker Carroll hits the post with a close range header after a mistake from Everton defender John Stones . The Hammers frontman found himself sharing a seat with supporters after having to jump the advertising hoardings . Carroll is given a helping hand back on to the pitch by a group of laughing Everton supporters . Everton and England youngster Ross Barkley (right) is scythed down by West Ham defender James Tomkins . Everton's highly rated defender Stones (right) takes the ball beyond West Ham playmaker Stewart Downing . Carroll of West Ham takes the ball down on his chest but the England international was starved of service in the fist-half . Steve Naismith (2nd left) gets a shot away under pressure from West Ham's Mark Noble (left) and Song (right) Valencia races on to Carroll's pass and fires across the goal to open the scoring for West Ham after the interval . Everton keeper Joel Robles can only watch as Valencia's shot passes him into the bottom left corner . Valancia rises to his feet and wheels away in search of Carroll to thank his West Ham team-mate for the assist . West Ham team-mates rush to congratulate Valencia after taking the all-important lead at Upton Park . Everton forwards Naismith and Lukaku begin the inquest after West Ham take the lead . 51min Enner Valencia opens the scoring with a well-placed finish into the bottom corner. 56min After hacking down Matt Jarvis 16 minutes earlier, Aiden McGeady picks up a second booking for sliding in on Mark Noble and is sent off. 82min Substitute Kevin Mirallas bends a superb free-kick from a tight angle past Adrian to level. 97min Romelu Lukaku’s close-range prod gives Everton the lead after great work from Mirallas. 107min Mirallas darts into the box and knocks the ball beyond James Tomkins before jumping over the West Ham defender’s leg. It’s a clear dive, but referee Neil Swarbrick awards a free-kick. 113min From a cross, Tomkins’ knock-down is converted by Carlton Cole and it’s all square again. 118min Tomkins and Mark Noble almost come to blows after Lukaku nearly scores a late winner for Everton, the Belgian pouncing on a botched clearance from Tomkins. 120min West Ham nearly snatch a last-gasp victory when Valencia finds Cole in the area. Cole tumbles, pokes out a leg and shoots but the ball rolls agonisingly wide. By BOB TREASURE . Yet into extra-time we went and West Ham responded to Lukaku’s goal with the introduction of substitute Carlton Cole. The big man Carroll met the challenge at the far post and Cole scrambled the 113th-minute equaliser beyond Robles. After that, the entire stadium patiently waited for penalties. On the sidelines the Everton coaching staff linked arms and Steven Naismith and Seamus Coleman celebrated in the centre circle as the penalties were despatched. On they went, with Everton’s magnificent 3,000 travelling fans celebrating each of their strikes after Naismith had missed their second. Lukaku, Leighton Baines, Brian Oviedo, Gareth Barry, John Stones, Phil Jagielka and Coleman matched them, with Stewart Downing missing for the Hammers. Then Robles was forced to take their 10th penalty because Everton were a man down. He took a run-up that would have rivalled a seam bowler, winding himself up and smashing the ball against the bar with an effort that was way off beam. That was the cue for Adrian, who was roared on by an increasingly expectant group of West Ham fans behind the goal in the Bobby Moore Stand who demanded a hero. They got one when he scored, beating his compatriot Robles easily to set up the trip to Ashton Gate. What a night that was. Defeat, even in this cruel manner, will provoke further questions about Martinez’s ability to lead this team. Yes they are out of the FA Cup because of the uncertainty of a penalty shootout, but they have lost six and drawn two of their last eight games. Their last win was against QPR on December 15, when they beat Harry Redknapp’s side 3-1 at Goodison Park. Martinez has had a charmed life in this competition, somehow earning a replay when Lukaku — who now has five goals in five matches against West Ham — equalised in then 90th minute at Goodison Park. Two years ago Martinez had his hands on the FA Cup when Ben Watson’s 90th minute header won it for Wigan on that incredible day at Wembley. Here Mirallas’s remarkable impact after coming on for the desperately disappointing Ross Barkley, stirred the emotions of Everton’s supporters. What a tribute to the group who travelled to see their team recover from Valencia’s 51st-minute goal. At that moment this Everton team looked resigned to be going out. The Hammers, wearing their curious purple shirts for the FA Cup, were in control when Carroll slipped Valencia through. McGeady begins his walk to the touchline after being sent off for a  second bookable offence . Substitute Mirallas strikes a sensational free-kick to bring Everton back into the game on 82minutes . Hammers keeper Adrian dives in vain as to Mirallas' free-kick sails past him into the top corner . The Belgum international wheels away after his free-kick looks to continue Everton's impressive record at Upton Park . Mirallas tries to get the visiting fans onside as Everton begin their incredible comeback . Gareth Barry turns away after referee Neil Swarbrick dishes out a yellow card for the midfielder's foul on West Ham striker Carroll . He held off the challenge of Everton defender John Stones and finished nicely beyond Robles. That appeared to be that. When McGeady, who had been booked in the first half, was sent off in the 56th minute, Martinez was preparing himself for an uncomfortable post-match inquest. Instead he was talking of pride and bemoaning the footballing gods for Everton’s third-round exit courtesy of this latest round of shootout roulette. The reality, alas, is that his team are back on the ropes. Lukaku repeated his heroics from the first game by getting on to Mirallas' cross to give Everton the lead in extra-time . The Belgium international prodded the ball home following excellent perseverance from international team-mate Mirallas . Lukaku is reported to have dedicated his goal to his friend Junior Malanda who tragically died in a car accident . Cole prods home a low cross to equalise for West Ham in extra-time and send the game towards a penalty shootout . The Hammers forward high fives with captain Kevin Nolan after bringing his side back level . Everton players look nervous as they line up to watch a thrilling penalty shooutout . West Ham keeper Adrian made the first save in the shootout by denying Naismith to give his side the advantage . Adrian stepped forward to take what was the final spot kick to score past his Everton opposite Robles . The West Ham keeper ended the game as a hero after scoring the winning spot-kick to set up a fourth round clash with Bristol City .
West Ham defeated Everton on penalties in their  FA Cup third round replay at Upton Park on Tuesday .
Enner Valencia opened the scoring for the Hammers in the second half after being played through by Carroll .
Toffees winger Aiden McGeady was sent off shortly after the goal for a second bookable offence .
Substitute Kevin Mirallas equalised for 10-men Everton with a superb free-kick late in normal time .
Romelu Lukaku got on the end of Mirallas' cross to give Everton the lead for the first time during extra-time .
Substitute Carlton Cole equalised for West Ham and came within inches of scoring a last minute winnerp .
The Hammers won the penalty shootout 9-8 after keeper Adrian scored the winning spot kick .
The winners will now play Bristol City in the FA Cup fourth round on the weekend of January 24-25 .
Click here to read Sportsmail's interview with West Ham goalkeeper Adrian .
In the end the gloves came off, and Adrian delivered the knockout blow. West Ham and their charismatic goalkeeper are up for the FA Cup. After two games and 210 minutes, a sending-off and 20 penalties, three of which were missed, Sam Allardyce and his team have been rewarded with place in the fourth round and a trip to Ashton Gate to play Bristol City, second in League One, at the end of the month. They can think about that later. VIDEO Scroll down for Sportsmail's Head to Head: Enner Valencia vs Romelu Lukaku . Keeper Adrian scored the winning spot kick in the 9-8 penalty shootout to send West Ham through to the FA Cup fourth round . Enner Valencia opened the scoring for West Ham after being played through by Andy Carroll in the second half . Everton winger Aiden McGeady (centre) was sent off early in the second half for a second bookable offence . Substitute Kevin Mirallas gave Everton a lifeline with a superbly struck late free-kick that left the West Ham keeper with no chance . Romelu Lukaku reaches for the skies after giving 10-men Everton the lead in extra-time following excellent work from Mirallas . Substitute Carlton Cole (right) came on to equalise for the Hammers in extra-time and send the game into a penalty shootout . West Ham (4-1-2-1-2): Adrian 8, Jenkinson 6, Tomkins 6, Collins 7.5 (Cole 6.5, 111'), Cresswell 6.5, Noble 6.5, Song 6 (Nolan 6, 16'), Downing 6, Valencia 7, Carroll 7, Jarvis 5.5 (Amalfitano 6, 96'). Subs: Vaz Te, O'Brien, Jaaskelainen, Burke. Booked: Nolan . Goals: Valencia 56', Cole 113' Everton: Robles 7, Coleman 6, Jagielka 6, Stones 5, Baines 6, Besic 5.5 (Mirallas 6, 77'), Barry 5.5, McGeady 4, Naismith 6, Barkley 6 (Oviedo 6, 76), Lukaku 7. Subs: Kone, Garbutt, Alcaraz, McAleny, Griffiths. Booked: McGeady (red), Mirallas, Barry, Robles . Goals: Mirallas 82', Lukaku 97' Referee: Neil Swarbrick . Ratings by Sam Cunningham at Upton Park . Wembley, along with the memories of 1964, 1975 and 1980 is a still long way off, not that you would know it by the way West Ham’s players celebrated this incredible night at Upton Park. When Adrian smashed the decisive spot-kick past his opposite number Joel Robles, he set off on the predictable celebration by a corner flag where his West Ham team-mates finally caught up with him. They have put a smile back on the face of the FA Cup. Sometimes you have to say to hell with the quality and think about the drama at a game like this. West Ham fans were lapping it up. They could easily have gone out after the introduction of Kevin Mirallas, who was thrown on in the 67th minute to save this game for Everton when they were down to 10 men. He almost turned match-winner, scoring a magnificent curling equaliser after 82 minutes and then drawing a massive circle inside the West Ham penalty area to supply Romelu Lukaku seven minutes into extra-time. The Belgian forward scored and then it was all about survival for Roberto Martinez and his Everton team. They almost made it over the line but Andy Carroll’s contribution to this third-round victory should not be underestimated. The big man set up the Hammers’ opening goal after 51 minutes with a teasing through ball for Enner Valencia to scramble beyond Everton keeper Robles. When Martinez’s team went down to 10 they looked done. Aiden McGeady, their most creative player in the first half, was the one dismissed after bringing down Mark Noble in the 56th minute and earning a second yellow. West Ham attacking coach Teddy Sheringham (right) watches as Alex Song practices his shooting ahead of the game . Roberto Martinez (left) and Sam Allardyce speak before the game after the Hammers boss accused his counterpart of not being flexible . West Ham striker Carroll hits the post with a close range header after a mistake from Everton defender John Stones . The Hammers frontman found himself sharing a seat with supporters after having to jump the advertising hoardings . Carroll is given a helping hand back on to the pitch by a group of laughing Everton supporters . Everton and England youngster Ross Barkley (right) is scythed down by West Ham defender James Tomkins . Everton's highly rated defender Stones (right) takes the ball beyond West Ham playmaker Stewart Downing . Carroll of West Ham takes the ball down on his chest but the England international was starved of service in the fist-half . Steve Naismith (2nd left) gets a shot away under pressure from West Ham's Mark Noble (left) and Song (right) Valencia races on to Carroll's pass and fires across the goal to open the scoring for West Ham after the interval . Everton keeper Joel Robles can only watch as Valencia's shot passes him into the bottom left corner . Valancia rises to his feet and wheels away in search of Carroll to thank his West Ham team-mate for the assist . West Ham team-mates rush to congratulate Valencia after taking the all-important lead at Upton Park . Everton forwards Naismith and Lukaku begin the inquest after West Ham take the lead . 51min Enner Valencia opens the scoring with a well-placed finish into the bottom corner. 56min After hacking down Matt Jarvis 16 minutes earlier, Aiden McGeady picks up a second booking for sliding in on Mark Noble and is sent off. 82min Substitute Kevin Mirallas bends a superb free-kick from a tight angle past Adrian to level. 97min Romelu Lukaku’s close-range prod gives Everton the lead after great work from Mirallas. 107min Mirallas darts into the box and knocks the ball beyond James Tomkins before jumping over the West Ham defender’s leg. It’s a clear dive, but referee Neil Swarbrick awards a free-kick. 113min From a cross, Tomkins’ knock-down is converted by Carlton Cole and it’s all square again. 118min Tomkins and Mark Noble almost come to blows after Lukaku nearly scores a late winner for Everton, the Belgian pouncing on a botched clearance from Tomkins. 120min West Ham nearly snatch a last-gasp victory when Valencia finds Cole in the area. Cole tumbles, pokes out a leg and shoots but the ball rolls agonisingly wide. By BOB TREASURE . Yet into extra-time we went and West Ham responded to Lukaku’s goal with the introduction of substitute Carlton Cole. The big man Carroll met the challenge at the far post and Cole scrambled the 113th-minute equaliser beyond Robles. After that, the entire stadium patiently waited for penalties. On the sidelines the Everton coaching staff linked arms and Steven Naismith and Seamus Coleman celebrated in the centre circle as the penalties were despatched. On they went, with Everton’s magnificent 3,000 travelling fans celebrating each of their strikes after Naismith had missed their second. Lukaku, Leighton Baines, Brian Oviedo, Gareth Barry, John Stones, Phil Jagielka and Coleman matched them, with Stewart Downing missing for the Hammers. Then Robles was forced to take their 10th penalty because Everton were a man down. He took a run-up that would have rivalled a seam bowler, winding himself up and smashing the ball against the bar with an effort that was way off beam. That was the cue for Adrian, who was roared on by an increasingly expectant group of West Ham fans behind the goal in the Bobby Moore Stand who demanded a hero. They got one when he scored, beating his compatriot Robles easily to set up the trip to Ashton Gate. What a night that was. Defeat, even in this cruel manner, will provoke further questions about Martinez’s ability to lead this team. Yes they are out of the FA Cup because of the uncertainty of a penalty shootout, but they have lost six and drawn two of their last eight games. Their last win was against QPR on December 15, when they beat Harry Redknapp’s side 3-1 at Goodison Park. Martinez has had a charmed life in this competition, somehow earning a replay when Lukaku — who now has five goals in five matches against West Ham — equalised in then 90th minute at Goodison Park. Two years ago Martinez had his hands on the FA Cup when Ben Watson’s 90th minute header won it for Wigan on that incredible day at Wembley. Here Mirallas’s remarkable impact after coming on for the desperately disappointing Ross Barkley, stirred the emotions of Everton’s supporters. What a tribute to the group who travelled to see their team recover from Valencia’s 51st-minute goal. At that moment this Everton team looked resigned to be going out. The Hammers, wearing their curious purple shirts for the FA Cup, were in control when Carroll slipped Valencia through. McGeady begins his walk to the touchline after being sent off for a  second bookable offence . Substitute Mirallas strikes a sensational free-kick to bring Everton back into the game on 82minutes . Hammers keeper Adrian dives in vain as to Mirallas' free-kick sails past him into the top corner . The Belgum international wheels away after his free-kick looks to continue Everton's impressive record at Upton Park . Mirallas tries to get the visiting fans onside as Everton begin their incredible comeback . Gareth Barry turns away after referee Neil Swarbrick dishes out a yellow card for the midfielder's foul on West Ham striker Carroll . He held off the challenge of Everton defender John Stones and finished nicely beyond Robles. That appeared to be that. When McGeady, who had been booked in the first half, was sent off in the 56th minute, Martinez was preparing himself for an uncomfortable post-match inquest. Instead he was talking of pride and bemoaning the footballing gods for Everton’s third-round exit courtesy of this latest round of shootout roulette. The reality, alas, is that his team are back on the ropes. Lukaku repeated his heroics from the first game by getting on to Mirallas' cross to give Everton the lead in extra-time . The Belgium international prodded the ball home following excellent perseverance from international team-mate Mirallas . Lukaku is reported to have dedicated his goal to his friend Junior Malanda who tragically died in a car accident . Cole prods home a low cross to equalise for West Ham in extra-time and send the game towards a penalty shootout . The Hammers forward high fives with captain Kevin Nolan after bringing his side back level . Everton players look nervous as they line up to watch a thrilling penalty shooutout . West Ham keeper Adrian made the first save in the shootout by denying Naismith to give his side the advantage . Adrian stepped forward to take what was the final spot kick to score past his Everton opposite Robles . The West Ham keeper ended the game as a hero after scoring the winning spot-kick to set up a fourth round clash with Bristol City .
Head to Head: Enner Valencia vs Romelu Lukaku . Keeper Adrian scored the winning spot kick in the the FA Cup fourth round . Enner Valencia opened the scoring for West Ham after being played through by Andy Carroll in the second half . Everton winger Aiden McGeady (centre) was sent after giving 10-men Everton the lead in . Substitute Carlton Cole (right) came on to equalise for the Hammers in extra-time and send goal to open the scoring for West Ham after the taking the all-important lead at Upton Park . 82min Substitute Kevin Mirallas bends a superb off for a  second bookable offence . Substitute Mirallas' cross to give Everton the lead in game towards a penalty shootout . The Hammers fourth round clash with Bristol City .