Scotland qualified for next week's European Cup final against Wales following a tight encounter with Lebanon at Old Anniesland in Glasgow.
The Scots went 4-0 down early on when Josh Mansour crossed the line.
Scotland took the lead through a Brendan Lindsey try, with Mick Nanyn adding a conversion and a penalty.
James Nixon converted another try to go 14-4 up, before Kevin Henderson's try completed the win and Lebanon's Nick Kassis added a consolation.
Scotland, who had previously thumping Italy 104-0, next week at Bridgend face a Welsh side that defeated Ireland 42-12 at Sardis Road in Group Two.
Whoever lifts this year's European Cup will only secure bragging rights, but the 2010 winners will qualify to join England, Australia and New Zealand in the four nations' tournament.