Lionel Messi feared Argentina were about to crash out of the World Cup until Angel di Maria popped up with an extra-time winner in Sao Paulo.

Argentina advanced to the quarter-finals with a 1-0 win over Switzerland after extra-time.

The scores had been level until the 118th minute thanks to some superb goalkeeping by Switzerland's Diego Benaglio, but Di Maria converted Messi's pass at the death to send the South American side through.

"I was nervous towards the end because we couldn't score and any mistake could have knocked us out," the Argentina captain told a press conference after the match in the Arena Corinthians.

"The minutes were passing by and we didn't want the match to go to penalties.

"We were suffering, but we had a special play, I passed to Angel and now we can celebrate."

"I was nervous towards the end because we couldn't score"

The South Americans dominated possession in the first half, but they would have been behind at the break had Josip Drmic not wasted a glorious chance to put Switzerland ahead.

The Swiss withstood a barrage from Argentina for the rest of the evening, with Benaglio making top saves to deny Di Maria, Rodrigo Palacio and Pablo Zabaleta.

The result means Argentina are still on course for a dream final with Brazil in the Maracana.

But coach Alejandro Sabella is refusing to start thinking about the final just yet.

"Our dream is only to work for the next match and try to move onto the semi-finals," he said.

"We do not look beyond that. To do so would be a mistake as we have already seen good teams like Spain, Uruguay, Italy and England have gone out."

Switzerland coach Ottmar Hitzfeld compared Di Maria's last-gasp winner to his experience in the 1999 Champions League final when Manchester United scored two late goals to defeat his Bayern Munich side in Barcelona.

"This also happened in the Champions League final," said Hitzfeld, referring to goals from Teddy Sheringham and Ole Gunnar Solskjaer at the Nou Camp 15 years go.

"I had to go onto the pitch after to console the players after because they did something great for themselves, the team and entire country."

The defeat brought down the curtain on Hitzfeld's long and successful management career.

The German, who bows out of the game with seven Bundesliga titles and two Champions League wins, said there was no way he would return to management.

"I will go on working for German TV, but my job as a coach has finished now," said the 65-year-old, whose brother died on the eve of the match.

"I am proud of my career. I have been very fortunate to coach marvellous teams and it has been a great honour to work for Switzerland.

"I therefore am proud to say goodbye to the Switzerland team with a heart full of emotions.

"We can walk tall and leave the World Cup with our heads held high."