Scotland will play New Zealand at Headingley on Friday after Tonga defeated Italy in Halifax.
The result leaves both Tonga and Italy eliminated from the tournament.
Tonga’s victory was built on a solid defensive display as they constantly nullified the Italian attack and scored three second half tries of their own.
James Tedesco was ruled to be held up two minutes into the second half, Willie Manu surging through the Italian defence shortly afterwards.
At that stage the Tongans defended strongly for a lengthy spell including one big Konrad Hurrell hit on Cameron Ciraldo.
Daniel Foster’s solo run saw the scrum half scamper over for Tonga’s second and when he had the ball pinched on the Italian line right on full-time Peni Terepo had the task of placing his hand on the ball to score.
Fuifui Moimoi was a deserved man of the match.