Lennon Miller delivered a goal and two assists on his competitive debut for Scotland Under-21s in a five-goal European Championship qualifying win in Malta.
Dane Murray, Josh Mulligan and Lewis Neilson were also on target, while Miller's Motherwell team-mate, Ewan Wilson, helped force an own goal on his debut.
A 1-0 win Hungary means Spains stay six points clear and have qualified for next year's finals as group winners, while the Scots remain second on goal difference after Belgium's 3-0 victory in Kazakhstan.
Wilson had been a late call-up to the squad for the double-header that started with Friday's 2-1 defeat by Spain.
The left-back started at Ta'Qali National Stadium with his former Fir Park team-mate, Max Johnston, on the other side of defence after the Sturm Graz defender linking up with Gemmill's squad following his spell with Steve Clarke's senior squad.
- Published10 September
Wilson set up the opener inside three minutes with a low driven cross that was turned into his own net by Matthew Ellul.
Scotland almost immediately had a major let-off when goalkeeper Cieran Slicker was fortunate only to receive a yellow card for a wild, high challenge outside the penalty area.
The visitors doubled their lead, though, in the ninth minute when Murray headed home Miller's free-kick and it was three inside 16 minutes when Dundee midfielder Mulligan slotted home after good pressing from Kieron Bowie.
Hibernian forward Bowie's game soon ended prematurely when he pulled up with what looked like a leg muscle injury.
Malta's Basil Tuma caused problems, the Reading winger forcing Slicker into a good save and then firing a glorious chance just wide, before Jeremiah Mullen missed a sitter at the other end following an excellent corner from Miller.
The 18-year-old Motherwell midfielder got his goal in the 56th minute when he headed home a precise cross from Daniel Kelly, who had replaced Bowie.
Dire Mebude and Mulligan came close for the Scots, but there were further let-offs when Mullen appeared to bring Tuma down in the box and Nikolai Micallef hit the bar with a volley.
Scotland subtitute Calvin Ramsay forced a save after some brilliant skill and Neilson bundled home number five in the 82nd minute following Miller's cross.
Gemmill's side, who are currently seventh in the race to be one of three best runners-up to qualify automatically, next host Belgium on 11 October before visiting Kazakhstan four days later.