Sam Allardyce's 100th match in charge of West Ham was one of his most memorable. A goal after 20 seconds and a winner with two minutes remaining ensured the Hammers advanced past Cardiff, but the manager would surely have exchanged the entertainment for the simpler path to the last 16 that his side should have trodden given their early dominance.
Two goals up in eight minutes reflected Cardiff City's abysmal first-half display, yet West Ham paid for their profligacy. Ravel Morrison, the brightest player on the pitch before his withdrawal after an hour, cut inside John Brayford to fire into the roof of Joe Lewis's net just seconds after Cardiff had kicked off, and Morrison had a key role in Matt Jarvis's close-range goal shortly afterwards.
Malky Mackay made 11 changes to the team that lost to Tottenham on Sunday and it showed in a disjointed opening 45 minutes. Yet with Lewis denying Ricardo Vaz Tê with a fine save and James Collins somehow missing an open goal from five yards, Cardiff remained in the game and were catapulted back to prominence when Craig Noone scored a wonderful 25-yard effort in the 45th minute.
Peter Odemwingie, on his first start for his new club, turned in a close-range finish with 14 minutes remaining to equalise, yet with extra-time beckoning Vaz Tê rose highest at the far post to nod in Jack Collison's cross from the right for a dramatic winner.
West Ham's assistant manager, Neil McDonald, said Allardyce was pleased with the victory but not so "with certain aspects of our game". And despite not being able to kill off the game in the first half, McDonald was particularly impressed with another fine display from Morrison.
"He's got all the skill; he's in the team to create and try and score. He took his goal really well, lots of composure and a great finish, that's what we need to do more often," McDonald said, while also claiming that Vaz Tê is "knocking on the door" of the first team despite handing in a transfer request last summer.
Mackay's decision to make wholesale changes perhaps reflected how seriously Cardiff considered this competition. Yet the 2012 finalists were in with a chance of a surprise comeback after a second-half performance that could not have been more contrasting with the first.
They became the dominant side but despite their increased possession they were finding it difficult to fashion scoring chances, while Collison forced an excellent stop from Lewis with a left-foot half-volley from 25 yards.
Noone almost doubled his tally when the winger cut inside and beat two players before shooting narrowly wide. Odemwingie, a £2.5m summer acquisition from West Bromwich, then tapped in from close range after a cross from Jordan Mutch.
"We had a mountain to climb the way we started," said Mackay. "I thought Odemwingie was excellent, he was someone that was going to take chances or set up chances. He's a terrific player and I'm delighted that we managed to sign him.
"He's back playing football again. He's an experienced Premier League player who shows his class when he plays and he's got a smile on his face again."
Allardyce, meanwhile, could join the 100 club with a smile to savour.