Match ends, Hungary 0, Scotland 1.
Hungary 0-1 Scotland
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.
McLeish made seven changes from the line-up that lost to Costa Rica, with Celtic defender Jack Hendry making his debut and Bournemouth winger Fraser getting a first start.
Scotland started with real tempo, closing down players quickly - exactly what they did not do in their last outing.
The condition of the pitch was problematic though. It was too patchy, causing players to lose control at vital moments.
Forrest was first to threaten when he gathered a lay-off from Phillips but fired off target.
The home side responded with Gergo Lovrencsics sending a 30-yard effort wide of McGregor's post.
Hungary captain Balazs Dzsudzsak then fired a free-kick towards the top corner which McGregor did well to palm away.
Despite those chances, Scotland looked largely comfortable against a side in transition. Hungary lacked confidence and have limited ability, as recent results demonstrate.
Forrest had a weak effort saved after robbing a defender and John McGinn had a strike blocked after clever play from Callum McGregor.
A gift of a chance arrived late in the first half when Fraser was rashly upended by Laszlo Kleinheisler right on the edge of the area.
Mulgrew thumped the penalty to Gulacsi's left but the goalkeeper produced a great save and fans must have wondered if it would be another frustrating evening for McLeish's side.
However, Scotland responded to that setback with a goal of genuine quality.
Fraser delivered a skidding cross from the right, it deflected into Phillips' path and the West Brom winger, deployed as a central striker, confidently stroked the ball home.
Phillips might have had another but elected to pass when the shot was on from a counter-attack.
The goal lifted Scotland's confidence and from that point the visitors were largely in control.
Having missed from the spot, Mulgrew's evening almost got worse when he gifted possession to Adam Szalai, allowing the towering striker a free run at McGregor.
The 36-year-old Hull keeper blocked brilliantly and then watched Szalai's flick creep narrowly past moments later.
It was a moment that might have undermined Scotland's evening and against better opponents would probably have been punished.
On a more positive note for the defence, Scott McKenna looked strong once again and Hendry impressed. Suddenly, Scotland appear to have depth at centre-half, a problem area for previous manager Gordon Strachan.
McLeish will take many positives from this win along with one or two learning opportunities to work on. It was a valuable exercise.
- 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
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.