Lionel Messi led some raucous celebrations in the Argentina dressing room after his inspired hat-trick booked his nation's World Cup spot at the eleventh hour.

Messi knew his side had to beat Ecuador in order to progress from the South American qualification group and ensure their presence at world football's most prestigious tournament.

The Barcelona man delivered his best when it mattered most and hit a sublime hat-trick to help his nation tie up a 3-1 victory in Quito's Estadio Olimpico Atahualpa.

Scroll down for video

Lionel Messi led the celebrations as Argentina secured their World Cup 2018 qualification

Messi was the star of the show and conducted the chants in the dressing room afterwards

Nicolas Otamendi later took to social media to upload a squad photo of the ecstatic stars

The whole squad and backroom staff got involved in the jubilant scenes at full-time

Famous songs echoed around the dressing room as relief poured over the Argentina team

Mas Unidos que nunca !!!!! A post shared by Javier Mascherano (@mascherano14) on Oct 10, 2017 at 8:13pm PDT

The tension was enormous prior to the fixture, with the vital importance of the clash paired up with the high-altitude setting making for difficult conditions.

Jubilation poured out in the aftermath of the win, with the Argentina stars letting out their emotion and celebrating their achievement.

Videos soon hit social media, with Javier Masherano uploading a clip of the dressing room scenes following the full-time whistle.

Messi rose to the occasion and personally hauled his nation into next year's World Cup

The talisman went home with the match ball after registering a sublime hat-trick in the tie

Argentina celebrated into the night after grabbing their chance to qualify in Ecuador

The win saw Argentina finish third in the qualifying group, while the likes of Chile missed out

MATCH FACTS Ecuador (4-1-4-1): Banguera; Velasco, Aimar Alvarez, Arboleda, Ramirez; Orejuela; Ibarra, Intriago (Uchuari 77), Cevallos (Valencia 41), Ibrarra Mina; Ordonez Ayovi (Estrada Martinez 64) Subs not used: Arreaga, Garces, Johnson Mina, Lopez, Murillo, Ortiz, Piedra, Plata Goals: Ibarra Mina 1 Yellow cards: Cevallos 14 Argentina (3-4-3): Romero; Mercado, Mascherano, Otamendi; Salvio, Perez, Biglia, Acuna; Messi, Benedetto (Icardi 77), Di Maria (Paredes 84) Subs not used: Banega, Dybala, Fazio, Gomez, Guzman, Mammana, Marchesin, Perez, Pezzella, Rigoni Goals: Messi 12, 20, 62 Yellow cards: Acuna 51, Biglia 61, Mascherano 86 Referee: Anderson Daronco (Brazil) Advertisement

Spirits were high with star-man Messi leading the chants, standing above his team-mates on the changing room benches.

The full team, including manager Jorge Sampaoli and backroom staff, were in full voice as they blared out a triumphant song in homage to the victory.

Following the match Sampaoli had gone as far as to say football owed Messi the World Cup, suggesting the tournament would not be the same without the player considered by many to be the greatest of all time.

'Today luckily the nationality of the best player in the world is Argentinian,' he said.

'We must be sure everything does not depend on Leo (Messi) (but) today he brought his great ability.

'I told the group: Messi did not owe the World Cup to Argentina, but football owed the World Cup to Messi.

'We should help him be in the World Cup,' Sampaoli added.

Argentina progressed in third place, behind Brazil who won the group and Uruguay.

Colombia made up fourth to grab the final qualifying place, while Alexis Sanchez and Chile were left heartbroken after failing to make the grade.

Manager Jorge Sampaoli (centre) said football 'owed' Messi a World Cup due to his brilliance

Team-mates were eager to have pictures with Messi, with Mauro Icardi uploading this snap