West Ham United took a giant leap towards the UEFA Europa League knockout stages with this hard-fought victory over Olympiacos at a mightily relieved London Stadium.

Lucas Paquetá had scored a mere consolation when these two sides met in Athens a fortnight ago and, this time around, following a Video Assistant Referee review, the Hammers record £50million signing found the net yet again to turn potential Greek tragedy into a Greek triumph.

The Boy from Brazil produced a stunning match-winning volley with just a quarter of an hour remaining to secure the win that keeps his side at the top of Group A with just two games left to play at bottom-placed Bačka Topola (Serbia) ahead of a final home tie against SC Freiburg (Germany) in second  spot.

These two teams had only been drawn against each other in European competition once before – the Hammers running up a fantastic 4-0 first-leg victory in a European Cup Winners’ Cup second-round tie at the Boleyn Ground in December 1965 - before drawing the return 1-1.

And while there was never going to be any repeat of that Upton Park goal-fest, 58 years on, Paquetá’s goal thankfully proved enough to make West Ham favourites to progress into those knockout stages.

Saturday’s dismal, disappointing defeat at Brentford had left the Hammers in 12th place in the Premier League but five days on from being stung by the Bees in west London, they now returned to their native East End also looking to avenge last month’s Group A loss in Athens.

Indeed, their tepid 2-1 reverse inside the boiling cauldron of the Georgios Karaiskakis Stadium had ended a record-breaking 17-match unbeaten European run, albeit David Moyes crestfallen troops still returned from the Greek capital topping Group A.

These past two years of European football have always proved a fine juggling act for the Hammers boss as he constantly seeks to counter-balance a footballing Thursday with the domestic demands of a Premier League Sunday.

But despite having one eye on edging further towards qualification for next spring’s knockout stages and the other on Nottingham Forest’s weekend visit to London Stadium, the Scot made just three changes from the side that had lost at the Gtech Stadium on Saturday.

In came European keeper Łukasz Fabiański for Alphonse Areola while the suspension-free pairing of Paquetá and Edson Álvarez returned to replace substitutes Tomáš Souček and Michail Antonio.

Rain falling from the London Stadium night, the ball was soon skidding across the greasy surface and in a frenetic start, Saïd Benrahma sent an ambitious, low 25-yarder wide of the base of the right-hand upright, while Mohammed Kudus and Jarrod Bowen embarked on a couple of mazy runs before running out of options.

With a dozen minutes on the clock, Benrahma was much closer with his second effort of the evening, a 15-yard curler that the airborne Alexandros Paschalakis tipped around his left post and, from the subsequent corner, Nayef Aguerd’s goal-bound header was held by the visiting keeper.

Kicking off in third place in Group A, the 47-time Greek champions had lost to PAOK Salonika (4-2) at the weekend – a defeat that left them in second spot in the Greek Super League, four points adrift of Panathinaikos.

But Olympiacos were showing few signs of any Sunday hangover.

Indeed, former Wolverhampton Wanderers striker, Daniel Podence was only thwarted by a timely Konstantinos Mavropanos interception before the Greeks forced a couple of corners ahead of having a handball shout against the deep-defending Paquetá.

Another attempted break by Sotiris Alexandropoulos earned Álvarez his eighth caution of an ever-increasing season of yellow for the Mexican and, shortly afterwards, Kudus then saw his name go into the book of Slovenian referee Matej Jug for dissent.  

On the half-hour mark, Benrahma was again denied by Paschalakis, who tipped his low 15-yader around the base of his right-hand post before Bowen and Aguerd both went close with headers as the Hammers desperately sought to break the deadlock.

An off-balance Podence served up due warning that Olympiacos were still a threat on the break by scooping Francisco Ortega’s left-wing cross wide and shortly afterwards the once-capped, back-pedalling Portugal striker became the third player to be booked for halting the escaping Emerson in full flow.

Displaying their trademark flicks, flashes and dashes, both Kudus and Paquetá continued to combine well but, ultimately, their routes to goal continued to be blocked and, while the Hammers shaded the opening 45 minutes on possession, shots and corners those statistics still could not mask a frustrating first-half stalemate.

The early exchanges of the second period largely mirrored those of the first but on the hour, Bowen’s clever left-wing cut-back should have set up the opener but in opting for precision over power, James Ward-Prowse saw his 15-yard shot comfortably held by Paschalakis.

Benrahma’s effort trickled into the keepers clutches but just when it looked like West Ham would be continually thwarted in their attempts to beat the Greek goalie, the telling moment finally arrived with just 15 minutes remaining.

With typical pinpoint accuracy, Ward-Prowse - 25 yards out – chipped a precision pass towards the penalty spot, where Paquetá ghosted behind Ortega to meet the ball as it dropped from the dark Stratford skies and the Brazilian expertly volleyed an unstoppable shot into the net.

At first glance, Paqueta looked offside, while an assistant referee’s flag cut short Claret and Blue celebrations, too, but following an anxious wait, the Video Assistant Referee came to the Hammers rescue to overrule the on-field decision.

There was to be more angst when Mady Camara struck the woodwork in the closing seconds of a niggly, frantic finale but in the end that timely Paquetá strike proved enough to give West Ham the three points they so desperately wanted in order to keep their European ambitions burning brightly.

WEST HAM UNITED: Fabiański, Coufal, Emerson, Mavropanos, Aguerd, Álvarez (Souček 80), Ward-Prowse, Paquetá, Benrahma (Cornet 83), Kudus (Mubama 89), Bowen. Unused subs: Areola, Anang, Johnson, Cresswell, Fornals, Antonio, Ings, Ogbonna, Kehrer.

OLYMPIACOS: Paschalakis, Rodinei, Ortega, Porozo, Retsos, Camara, Alexandropoulos (Scarpa 76), Hezze (Pep Biel 89), Fortounis, Podence (Masouras 76), Jovetić (El Kaabi 55). Unused subs: Tzolakis, Papadoudis, Iborra, El-Arabi, Quini, João Carvalho, Ntoi, Solbakken.

Booked: Álvarez (18), Kudus (28), Podence (38), Porozo (83), Fortounis (90+1), Camara (90+2), Bowen (90+2).

Referee: Matej Jug (Slovenia).