(Reuters) - Angel Di Maria swooped deep into extra time to give Argentina a 1-0 win over Switzerland in a gripping last 16 tie on Tuesday, as the South Americans booked a spot in the World Cup quarter-finals.

After a tense 0-0 draw at 90 minutes and scoreless first period of extra time, Argentine playmaker Lionel Messi suddenly found a yard of space and released Di Maria, who swept the ball home first time before wheeling away in delight.

Blerim Dzemaili came within inches of saving Switzerland when his powerful downward header hit the post with goalkeeper Sergio Romero stranded, but Argentina rode their luck to celebrate the win while the Swiss slumped to their knees in despair.

Argentina now face a quarter-final against either Belgium or the United States, who were also playing on Tuesday.

Di Maria, who had given the ball away far too easily but peppered the Swiss goal with shots, said the entire squad deserved credit for the win.

"It wasn't me, the heroes are 23 players and the technical staff. We gave our lives, our souls," said Di Maria, who dedicated the goal to his wife and daughter. "I think the victory is more than deserved. We need to carry on like this, leaving our lives on the pitch."

It was a cruel end for Switzerland, who had stretched Argentina early on but lost steam in the latter stages.

"Football is brutal, brutal, brutal," said assistant coach Michel Pont.

Messi revealed the inner torment his team felt as the game dragged towards a dreaded penalty shootout.

"Suffering, suffering, that’s what we felt," he said. "We know we will go through times like this. That’s football. We had luck on our side. We need to now move on."

MARVELOUS SHOT

Argentina had leaned heavily on Messi throughout the group stage, the mercurial number 10 scoring four of their six goals, and the forward was again at the heart of all their best work, prompting and prodding in front of the massed Swiss defense.

While Switzerland managed to keep Messi off the scoresheet, coach Ottmar Hitzfeld said he had made the difference.

"We know that Messi in one second can decide a match, and he has sufficient qualities for that, but then the pass to Di Maria and then the marvelous shot by Di Maria," said Hitzfeld, who had already announced he was stepping down after the tournament.

He was philosophical about the manner of defeat, which kept his side waiting for their first ever win over Argentina.

"This is football, these are strong emotions and these are emotions you only have in football, and that's why we love football," he added.

Switzerland, who were looking to return to the quarter-finals for the first time since hosting the tournament in 1954, went closest to scoring in a tight first half when impish playmaker Xherdan Shaqiri released Josip Drmic through on goal.

The tall striker shaped to shoot but wasted the opportunity with an ill-advised chip and Romero gathered comfortably.

With the score tied at 0-0 at halftime, the game then opened up in the second period as Argentina grabbed the momentum, and their blue and white clad fans brought the Corinthians arena to life, chanting and bouncing in unison.

The warning signs were flashing for Switzerland when Gonzalo Higuain went close with a header before Messi drove into the box and forced Diego Benaglio into a great save.

However, despite camping out in the Swiss half for long sections of the second half Argentina could not make the breakthrough and the 90 minutes ended scoreless.

Argentina looked the stronger side in extra time when Swiss legs began to tire and, just when it looked like Swedish referee Jonas Eriksson would call for a penalty shootout, Messi scampered clear and picked out Di Maria.

Drifting in from the right, Di Maria curled a left-foot shot around the diving Benaglio to seal the win with just three minutes left in extra time.

Swiss substitute Gelson Fernandes was heartbroken but proud.

“It is cruel to end this way," he said. "We were absolutely not afraid of our adversary, we wanted to make history. It is a bit difficult to accept."