Ten-man West Ham needed a penalty shoot-out to see-off Maltese Cup champions Birkirkara and progress into the Europa League third qualifying round after toiling in the heat of Malta.
A 1-0 defeat and disappointing display on the evening meant the Premier League side needed penalties to go through - although when it came down to the shoot-out, the Hammers scored all five of their kicks.
Substitute Diego Poyet stroked home the winning penalty after Birkirkara had also been reduced to 10 men in extra-time.
SUBMIT AN ARTICLE
Apply to become a GMS writer by signing up and submitting a 250 word test article: https://gms.to/haveyoursay5
Having scored a last-gasp winner in the first leg at Upton Park seven days ago, James Tomkins was sent off before half-time at the Ta' Qali National Stadium in Valletta.
With Diafra Sakho banned following his red card in the previous round West Ham, who ironically qualified for the competition through the Fair Play League, had very few options in attack and rarely threatened.
Mauro Zarate was played as a lone frontman and substitute Modibo Maiga is not a reliable source of goals and it showed against the Maltese outfit.
Former Italy international Fabrizio Miccoli put Birkirkara in front on 14 minutes with one of the only clear-cut chances of the entire encounter, with Giovanni Tedesco's side more than a match for an experienced West Ham line-up.
Mauricio Mazzetti was sent off in extra-time for a second bookable offence as a poor encounter was decided by a shoot-out, with Nicolai Vucanac missing for the home side.
The hosts started lively as they looked to cancel out the first-leg deficit, with James Collins' indecision almost allowing a dangerous set-piece to sweep through the box before being poked behind by Joey O'Brien.
Despite being on the back foot in the opening 10 minutes, the Hammers had the first telling effort of the game as Mark Noble's corner was cleared as far as Matt Jarvis, who controlled on his chest before firing a low volley straight at Justin Haber in the Birkirkara goal.
That did not dent the early confidence of the home side and Miccoli was on hand to sweep home at the near post after smart work by strike partner Ellenton Liliu.
As West Ham continued to make heavy weather of the tie, Noble was cautioned after tangling with Miccoli as the Birkirkara players then began to rile up the midfielder.
Mazzetti was then booked for a foul on Zarate before the Hammers' frustrations continued as Tomkins and Vucanac wrestled with one another in the penalty area ahead of a West Ham free-kick - with the Hammers defender sent off and Vucanac booked for the coming together.
Birkirkara midfielder Marcelina had a tame effort towards the end of the half, which came to an end at the right time for West Ham, who needed to regroup after a poor opening 45 minutes.
Little changed after the interval and Hammers coach Slaven Bilic responded by introducing Poyet and Maiga in place of captain Kevin Nolan and Morgan Amalfitano.
Jarvis went down under pressure from Vucanac on the hour mark but referee Enea Jorgji was unmoved by the penalty appeals.
The winger had a more substantial claim rejected shortly afterwards as West Ham still could not work Haber.
The half was bereft of chances and it was no surprise when the game drifted into extra time, with Birkirkara looking to hit on the counter-attack despite their numerical advantage.
Mazzetti's red card in the early stages of the second period of extra-time levelled the numbers, with Maiga finishing well late on only to see his effort chalked off for offside.
That took the game to penalties but Noble, Zarate, Aaron Cresswell, O'Brien and Poyet all converted successfully to set the Hammers up with a third qualifying round clash with Astra Giurgiu of Romania, conquerors of Scottish side Inverness Caledonian Thistle.
Do YOU want to write for GiveMeSport? Get started today by signing-up and submitting an article HERE: https://www.givemesport.com/writeforgms