Debutant Lawrence Shankland scored a late double as Scotland Under-21s earned a 2-1 friendly win in Hungary.
Szenes Bence had put the hosts ahead just after the hour-mark but Scotland fought back.
And Aberdeen striker Shankland struck twice in the final five minutes to turn the match in the Scots' favour.
It was former St Mirren manager Danny Lennon's first game in charge after Billy Stark quit last November.
Lennon was initially given the reins on a one-off basis for the friendly in Tatabanya, but has already stated his desire to secure a long-term contract.
His new-look side started brightly, with Aberdeen's Declan McManus heading straight at goalkeeper Gergely Nagy and St Mirren's John McGinn firing over.
Sporting Lisbon's Ryan Gauld glanced another header wide before Hibs' Danny Handling failed to hit the target.
The Scots were made to pay for their missed opportunities when Bence pounce on a loose ball to fire past Hearts goalkeeper Jack Hamilton.
The Hungary striker was denied a second, and Shankland headed past Nagy for Scotland's equaliser.
Shankland and Dundee United's Charlie Telfer both had efforts saved as the visitors pushed for a winner.
And it finally came in stoppage-time when the Dons prospect bundled home from close range.