Four goals from Fanis Gekas gave Greece an invaluable victory over World Cup qualifying Group 2 rivals Latvia and kept their hopes of topping the section alive.

Greece dominated the entire match but strangely found itself down 1-2 at half time, before Gekkas’s second half heroics rounded out the 5-2 win at OAKA.

Both sides were level in the standings at kick-off in second place, with both teams needing victory to stay in touch with leaders Switzerland following their 3-0 win in Luxembourg earlier on Wednesday.

Thanks to Bayer 04 Leverkusen striker Gekas, Greece will secure at least a play-off by beating Luxembourg on Wednesday and will qualify automatically if Switzerland lose to Israel.

Gekas headed Greece into the lead from a Giorgos Karagounis cross after just four minutes.

Karagounis found the unmarked Gekas who launched himself at the in-swinging ball, which struck the inside of the right hand post before crashing into the back of the net.

But despite the great start, the in-form Vassilis Torosidis completely botched a clearance in the 12th minute, which led to Latvia’s equalising goal.

Ergotelis striker Maris Verpakovskis converted with a stylish overhead kick from a rebound after a spectacular save by Alexis Tzorvas.

Tzorvas could only parry the ball before Verpakovskis made it 1-1.

Karagounis hit the crossbar two minutes later with an ambitious long range volley that dipped onto the bar. Latvia went close twice and Samaras sent a shot wide on the edge of the box in the 38th minute.

But the home side was punished in the 40th and were to go into the break a goal down, with Verpakovskis’ right-footed shot from Girts Karslons’ cross finding the net five minutes from half-time.

The usually substitute-shy Otto Rehhagel took the unusual step of making a double substitution at halftime, Christos Patsatzoglou replaced the ineffective Alexandros Tziolis and Yiannis Amanatidis came on for Dimitris Salpigidis to partner Gekas in attack, with Samaras moving to a more withdrawn role.

The changes paid immediate dividends, when Greece equalised two minutes into the second half, Gekas converting a penalty after Oskars Klava brought down Georgios Samaras with very heavy marking in the box.

Seven minutes later, Gekas had completed his hat-trick with a powerful 57th-minute header, Vassilis Torosidis supplying the assist. The goal gave Greece the lead once more and the comeback seemed complete.

Gekas and Greece almost had a fourth when he reacted before the Latvian defenders to a quick free-kick but Vanins managed to push his close-range volley around the post.

But Greece was not to be denied a famous victory, with an incredible goal by Samaras, who with a scissor-kick, made it 4-2 on 72 minutes.

Samaras controlled Karagounis’ corner with his ankle, flicking the ball up for himself to acrobatically scissor the ball into goal from close range, albeit on a tight angle.

Greece was hungry for more goals as Rehhagel’s troops poured forward as man of the match Gekas pounced at the end for his fourth of the night after Latvia failed to clear. His final strike put him level on nine goals with England’s Wayne Rooney in the race to be the highest scorer in European qualifying.

For Latvia to reach the play-offs, they must defeat Moldova and hope Greece lose to Luxembourg by enough to overhaul their goal difference, and even then rely on Switzerland not beating beaten by Israel.