Substitute Valentin Stocker scored a late winner as Switzerland beat Hungary 3-2 in Budapest to make it back-to-back World Cup qualifying victories.
It appeared as if Hungary would claim a share of the spoils after Adam Szalai had netted twice to cancel out goals from Haris Seferovic and Ricardo Rodriguez, his first at international level.
But Stocker found the net a minute after his introduction at Groupama Arena as Switzerland built on their impressive win over European champions Portugal.
There was little in the way of action in a cagey first half but Switzerland twice went close to opening the scoring on 27 minutes as Fabian Schaer had a header well saved by Peter Gulacsi before Zoltan Stieber cleared Blerim Dzemaili's rebound off the line.
Stieber volleyed straight at Yann Sommer as Hungary began the second period on the front foot but Switzerland took the lead in the 51st minute.
Hungary defender Adam Lang made a mess of a clearance and Seferovic fired home after Gulacsi could only push Xherdan Shaqiri's shot into his path.
Szalai tapped in an equaliser two minutes later but Rodriguez restored Switzerland's advantage on 67 minutes with a superb volley across Gulacsi and into the bottom corner.
Back came Hungary and they were level again within four minutes as Szalai bundled the ball over the line from Stieber's volleyed cross.
But Switzerland were not to be denied, Stocker stealing the three points with a deflected effort from Stephan Lichtsteiner's long throw-in a minute from time.