In Saturday's end-to-end affair, which will go down as one of the most-exciting tussles of the tournament, Tonga's first-half display was just enough to get them over the line.
In a helter-skelter opening stanza, Mate Ma'a piled on three tries in 22 minutes, only for the valiant Cedars to get back to within a try by halftime.
An attritional second half in which both sides were out on their feet was ultimately decided by an Ata Hingano penalty goal - surpassing a try-of-the-cup contender from Cedars winger Abbas Miski.
With a Mitchell Moses-inspired Lebanon unable to nab a late winner, Tonga progress to a semi-final next week against England or Papua New Guinea.
A World Cup final is on offer against Australia or New Zealand in what would be a historic achievement for a tier-two rugby league nation.
While Tonga's forwards were at their typical destructive best, it was the Parramatta-based Moses who stood head and shoulders above the rest.
He and South Sydney's Robbie Farah kept an inferior Lebanese pack in the hunt, guiding their side around admirably and leading their fearless second-phase play.
"I'm pretty heartbroken at the moment," Moses said, dismayed at several disallowed Lebanese tries.
"The boys dug deep and stayed in the game for the 80 minutes.
"Every single player in that (Tonga) team has a full-time contract, and there's probably five of us that do - to see how hard the boys worked and to be pulled up in that manner, it's pretty heartbreaking."
Having gone undefeated in a pool including tier-one giants New Zealand, Ma'a roared out of the blocks, scoring three tries in the opening period, with winger David Fusitu'a in particular running riot.
Yet, with a 16-6 lead, the Polynesians took their foot off the pedal.
Lebanon pinched two tries late in the first half, including a bizarre effort from James Elias who capitalised on a Jason Taumalolo falcon.
The double sent the Cedars into the break 22-16 behind and with all the momentum - which they continued into the second half but without the ultimate reward.