With just three teams in the group, and both teams having won their previous matches against Thailand, Wednesday's clash served as a virtual knockout game for a place in the semifinals.
Lebanon held its nerve till the end of an otherwise balanced affair as it pulled off a last-minute winner to advance to the last four.
Oman began well and led twice before Lebanon fought back to win the contest. Oman missed a chance to take lead early when Abdullah al Balushi’s free-kick went wide, but Yahya al Araimi found the Omanis’ opening goal with a minute remaining.
Lebanon’s equaliser came in exciting fashion as Moustafa al Zein’s free-kick from a distance bounced off keeper Amjad al Hamdani and slowly rolled in.
Oman went ahead 2-1 as Nooh al Zadjali easily tapped in with two minutes remaining in the second period. Lebanon made it 2-2 just after the restart as skipper Mohamad Merhi struck home from mid-range.
But Oman regained the lead almost immediately after with an Abdullah Salim strike.
Soon after, Merhi brought Lebanon back into the contest by making it 3-3, and a neat header from Ahmed Grada a mere three seconds from time clinched the game for Lebanon.
In the semifinals, Lebanon meets UAE and Japan takes on Iran. UAE beat Japan 5-4 in a Group C game, but the latter made it to the last-four stage as the best second-placed side.
Iran, meanwhile, defeated Bahrain 5-2 in a Group A match.
The top three finishers at the AFC Beach Soccer Championship will take part in the 2017 FIFA Beach Soccer World Cup, scheduled to be played in Nassau, Bahamas from April 27-May 7.