Comic genius Robin Williams narrowly escaped tragedy when the cabin in his private plane filled with smoke while he was flying to Aspen, Colo., and rescue crews were scrambled as the burning plane came in for an emergency landing.

The incident occurred February 28 while the comic, along with 10 friends and family members, were flying into Aspen’s Sardy Field for the U. S. Comedy Arts Festival.

“Robin was white as a ghost and glad to be alive after the Gulfstream III jet landed,” revealed an eyewitness to the terrifying incident. “Any time you have a mechanical failure and smoke in the cabin at around 30,000 feet, you’re cheating death if you come out of it alive.”

Robin’s brush with disaster took place minutes before his plane was scheduled to lad at Aspen, where the funnyman’s new film “Death to Smoochy” was to premiere.

Suddenly pilots noticed smoke billowing from the electronic panel in the cockpit – and immediately radioed ahead to advise the control tower.

“Rescue vehicles and fire units rushed to meet the plane on the runway,” the eyewitness said. “The passengers were frightened for their lives as smoke wafted through the plane.”

Meanwhile, the pilots aboard Robin’s plane took steps to bring the crisis under control and land the plane safely. Said Fred Mosher, a line manager at Aspen Base Operations: “They shut down the electronic panel and the smoke stopped. The plane made a relatively smooth landing.”

White-faced Robin was escorted off the plane with the other shaken passengers – but, amazingly, the courageous comic was soon cracking jokes to relieve the tension of the near-disaster, the eyewitness reported:

“He good-naturedly joshed one of the pilots saying, ‘No more smoking in the cockpit – it makes it hard to see when you’re landing!’ “