Matt Phillips scored his first international goal as Scotland earned their first win of Alex McLeish’s second spell in charge against Hungary.
James Forrest missed two good chances and captain Charlie Mulgrew’s penalty was saved after Ryan Fraser was felled.
But Phillips tapped home Fraser’s cross three minutes into the second half.
Scotland keeper Allan McGregor twice denied Roland Varga and then Adam Szalai after a mistake from Mulgrew as the visitors held on in Budapest.
Victory followed Friday’s lacklustre 1-0 home defeat by Costa Rica at Hampden Park.
Scotland’s next friendlies will come on an end-of-season tour against Peru, on 29 May, and Mexico, on 2 June, as they continue to prepare for the Nations League starting in September.
Celtic centre-back Jack Hendry made an assured debut after replacing the injured Grant Hanley in a three-man defence, while Aberdeen’s Scott McKenna produced another strong display after a promising debut against Costa Rica.
The re-introduction of midfield trio Stuart Armstrong, John McGinn and Callum McGregor also gave Scotland greater momentum and bite.
They started at a good tempo but slack play from their own throw-in allowed Balazs Dzsudzsak the first shot at goal, but McGregor made a comfortable save.
The 36-year-old was forced into an excellent stop from a Dzsudzsak free-kick after 20 minutes.
Forrest had already dragged a half-volley wide and the Celtic winger could only produce a weak effort after cutting inside from the byline.
McGinn also had a strike blocked after clever play from McGregor as Scotland pressed for an opener.
They were gifted a chance to go ahead in the 40th minute following a clumsy challenge on Fraser by Laszlo Kleinheisler.
But Peter Gulacsi threw himself to his left to push away Mulgrew’s firmly-hit spot-kick.
Forrest spurned another good chance from McKenna’s cross as the first half drew to a close, and Scotland were grateful for Andy Robertson’s positioning to stop Richard Guzmics’ header going inside the far post following a corner.
Scotland took the lead within three minutes of the restart when Phillips met Fraser’s superb cross left-footed and fired home first time from eight yards.
But there were several alarms as Hungary, fresh from a home defeat by Kazakhstan, threatened an equaliser.
Varga unleashed a looping effort on the hour which McGregor tipped over, before the Scotland keeper diverted a free-kick from the same player wide.
Fraser set up Phillips on the break at the other end, but this time the West Brom forward lacked conviction as he tried to play the ball across goal.
Mulgrew nearly cost his side dear when he gifted possession to Szalai with 20 minutes left, McGregor bailing out his captain by blocking the striker’s effort.
Wolves full-back Barry Douglas came off the bench for his debut, while Aberdeen pair Kenny McLean and Ryan Christie, Cardiff’s Callum Paterson and strikers Oli McBurnie and Jason Cummings also made late substitute appearances.
But Scotland kept their shape and saw out a morale-boosting victory in relative comfort.
- 4OtigbaBooked at 90mins
- 16PintérSubstituted forElekat 45′minutesBooked at 66mins
- 15KleinheislerSubstituted forPátkaiat 67′minutes
- 24HangyaSubstituted forSzabóat 45′minutes
- 17VargaSubstituted forNikolicat 83′minutes
- 9SzalaiBooked at 46minsSubstituted forBödeat 77′minutes
- 7DzsudzsákSubstituted forNémethat 58′minutes
- 5MulgrewBooked at 49mins
- 2FraserSubstituted forPatersonat 82′minutes
- 8McGinnBooked at 86mins
- 7ArmstrongSubstituted forMcLeanat 70′minutes
- 3RobertsonSubstituted forDouglasat 67′minutes
- 11ForrestSubstituted forChristieat 77′minutes
- 10McGregorBooked at 42minsSubstituted forCummingsat 90+3′minutes
- 9PhillipsSubstituted forMcBurnieat 84′minutes
- Harald Lechner
- Shots on Target
Match ends, Hungary 0, Scotland 1.
Second Half ends, Hungary 0, Scotland 1.
Hand ball by Jason Cummings (Scotland).
Substitution, Scotland. Jason Cummings replaces Callum McGregor.
Kenny Otigba (Hungary) is shown the yellow card for a bad foul.
Oliver McBurnie (Scotland) wins a free kick in the attacking half.
Foul by Kenny Otigba (Hungary).
Allan McGregor (Scotland) wins a free kick in the defensive half.
Foul by Nemanja Nikolic (Hungary).
Foul by Callum McGregor (Scotland).
Máté Pátkai (Hungary) wins a free kick in the defensive half.
John McGinn (Scotland) is shown the yellow card for a bad foul.
Foul by John McGinn (Scotland).
Gergö Lovrencsics (Hungary) wins a free kick in the defensive half.
Offside, Hungary. Péter Gulácsi tries a through ball, but Máté Pátkai is caught offside.
Foul by Callum Paterson (Scotland).
Krisztián Németh (Hungary) wins a free kick in the defensive half.
Substitution, Scotland. Oliver McBurnie replaces Matt Phillips.
Substitution, Hungary. Nemanja Nikolic replaces Roland Varga.
Substitution, Scotland. Callum Paterson replaces Ryan Fraser.
Scott McKenna (Scotland) wins a free kick in the defensive half.
Foul by Dániel Böde (Hungary).
Charlie Mulgrew (Scotland) wins a free kick in the defensive half.
Foul by Dániel Böde (Hungary).
Attempt missed. Kenny McLean (Scotland) header from the centre of the box misses to the right. Assisted by Barry Douglas with a cross.
Substitution, Hungary. Dániel Böde replaces Ádám Szalai.
Substitution, Scotland. Ryan Christie replaces James Forrest.
Jack Hendry (Scotland) wins a free kick in the defensive half.
Foul by Richárd Guzmics (Hungary).
Corner, Hungary. Conceded by Scott McKenna.
Offside, Scotland. Allan McGregor tries a through ball, but Matt Phillips is caught offside.
Kenny McLean (Scotland) wins a free kick in the attacking half.
Foul by Ákos Elek (Hungary).
Attempt missed. Ádám Szalai (Hungary) right footed shot from the centre of the box is close, but misses to the left. Assisted by Gergö Lovrencsics with a cross.
Attempt saved. Ádám Szalai (Hungary) right footed shot from outside the box is saved in the bottom left corner.
Substitution, Scotland. Kenny McLean replaces Stuart Armstrong.
Corner, Scotland. Conceded by Richárd Guzmics.
Substitution, Hungary. Máté Pátkai replaces László Kleinheisler.
Substitution, Scotland. Barry Douglas replaces Andrew Robertson.
Ákos Elek (Hungary) is shown the yellow card for a bad foul.