Base jumper Andrei Nefedov eaps from the top of the Kuala Lumpur Tower during the International Tower Jump. Some 95 professional base jumpers from 18 countries are taking part in the annual event. Photo: AFP/Getty Images

PHEW! Junianny Santos and a little loved one hug after the near-disaster at JFK Airport yesterday. (James Messerschmidt)

FALCAO
Lots of “crying.”

It really was a “magic” ride.

The twisted front landing gear of a jumbo jet nicknamed The Magic Red Carpet miraculously rotated back into position just seconds before landing at JFK yesterday — as panicked passengers braced themselves for a crash.

“It was like the hand of God turned the wheel,” said a Port Authority cop who was part of the disaster-response crew deployed to the tarmac.

None of the 190 people aboard TAM Flight 8078 from Rio de Janeiro was hurt, despite getting the fright of their lives.

As the jet approached Kennedy, its nose gear dropped down — but the wheels were turned at a right angle.

“It appears cocked at 90 degrees,” a controller radioed one of the pilots.

The jet circled the airport twice so controllers and rescuers could get a look at the nose gear.

Capt. Moacir de Oliveira, 58, who has 2,800 hours of experience on the A330, then proceeded with an emergency landing after consulting with his flight crew, the airline’s headquarters in Brazil and controllers.

Seconds after the landing gear beneath the jet’s wings touched the runway, the nose gear suddenly locked itself in the correct direction.

“It appears as you were landing the nose gear did straighten out,” the controller radioed as the plane rolled down Kennedy’s Bay Runway, which at 14,500 feet is one of the nation’s longest.

The landing was so smooth that the relieved passengers erupted in applause.

“It was a perfect landing, better than normal,” said Freiha.

The Airbus made it to a taxiway and the awaiting emergency vehicles under its own power.

“The crew took all necessary precautions, and landing occurred in total safety,” said airline spokesman Carlos Teciano.