Wales will be the odd one out of the home nations after failing to qualify for the 2008 World Cup.
They were on course to join England, Ireland and Scotland in the main draw in Australia when they led 20-10 early in the second half of their repechage semi-final at Widnes.
But they suffered a dramatic collapse, conceding five tries in 22 minutes to finish a well-beaten side at the Halton Stadium and rendering winger Damian Gibson's hat-trick of tries little more than consolation.
Wales, who reached the semi-finals in both 1995 and 2000, will most likely have to wait until 2013 for another chance while Lebanon will take on Samoa in Wednesday's repechage final at Featherstone for the 10th and final place next year.
Experienced loose forward Chris Salem, who plays for Sydney Bulls, was the hero for Lebanon, whose tonight was sweet revenge for their 24-22 defeat by Wales in the last World Cup in Llanelli.
Yet Wales made a dream start with two tries in the first nine minutes, both crafted by captain Lee Briers, and they totally dominated the first half.
The Warrington scrum-half hoisted a pinpoint kick for Gibson to touch down at the corner and then got his Wolves team-mate Andy Bracek charging over from his accurate pass.
Centre Frank Samia pulled a try back for Lebanon on 19 minutes but it was virtually all Wales, who twice declined penalty kicks at goal in order to pile on the pressure, but they only had one more try to show for all their efforts.
Gibson finished off superbly for his second after Luke Dyer collected Briers' floated pass and Iestyn Harris kicked his second conversion to make it 16-6.
The game was then thrown wide open just before the break when Salem split the Welsh defence with an outrageous dummy and crossed for Lebanon's second try.
When Gibson produced some more clinical finishing three minutes into the second half to complete his hat-trick, Wales seemed to have re-established their hold on the game but three tries in a 12-minute spell turned it upside down.
Scrum-half George Ndaira, Lebanon's only full-time player who is moving from St George Illawarra to Sydney Roosters for 2008, worked Salem over for his second try and then sped over for one of his own to level the scores at 20-20.
Toufic Nicholas' conversion put Lebanon in front for the first time and prop Ray Moujali increased the lead on 57 minutes when he forced his way over from close range.
The Welsh defence opened up again all too easily to allow substitute Ali Kourouche before Salem completed his hat-trick.
Wales briefly stopped the rot with winger Anthony Blackwood scoring a try which Briers converted but Lebanon finished well on top with second rower Chris Saab and winger Adham El-Zbaideh adding further tries and Nicholas taking his goal tally to seven from nine attempts.Reuse content