James Tomkins found the net in added time to ensure that a night of frustration for West Ham United ended on a positive note against Birkirkara.
With time running out, the Englishman found himself in the right place at the right time to bundle home for a Hammers side who had been wasteful up until that stage in the first leg of their Europa League second-round qualifier.
The home side had an early penalty appeal turned down when Modibo Maiga went to ground inside the box, while the Mali international headed over a Matt Jarvis cross soon after.
Morgan Amalfitano was the next West Ham player to try his luck, curling the ball a yard over the bar as the Hammers continued to press for an opener in front of the 33,000-strong crowd.
Further shouts for a penalty were waved away by referee Markus Hameter to skipper Kevin Nolan's dismay on the 20-minute mark, which came just moments before Maiga tested Justin Haber with his headed attempt.
A lively Maiga was involved throughout the opening 45 minutes, again finding space to get a shot away which this time came back off the post.
Haber had plenty to do before the half was out, but the Premier League club were unable to show the quality needed in front of goal to find a way through.
Continuing from where the first half left off, Jarvis cut inside and fired a low shot away at goal, although Haber was once more able to keep the ball out with relative ease.
There was a small scare for West Ham when Mauro Zarate got caught in possession, which allowed the visitors to charge up field on the break, only for Liliu to direct his shot wayward.
Elliot Lee, the match-winner against Andorran side Lusitanos seven days ago, was brought on with 20 minutes left to play, but still the Hammers struggled in front of goal.
Zarate, Jarvis and Lee himself each tried finding a way through, yet it looked as though it was going to be a hugely frustrating night for Slaven Bilic's men in the Croat's first official home game in charge.
That was until Haber misjudged the flight of a corner whipped into the box, which Tomkins chested into the net to earn West Ham a crucial first-leg lead at the death.