A pilot in Mexico has lost his job after he allowed singer Esmeralda Ugalde to sit in the captain's seat and take command of his aircraft during a recent flight.

The 23-year-old sister of Latin Grammy winner Ana Barbara and her friend Samadhi Zandejas, 19, were passengers on board a Magnicharters flight between Cancun and Mexico City when they were invited to enter the cockpit and snap shots with the pilot.

One photo of herself at the helm of the airplane, which Ugalde shared with her Twitter.com followers, went viral and landed the captain in trouble after Magnicharters bosses caught sight of the image and launched an investigation.

The pilot has since been fired from his post.

Company spokesman Jorge Badia says, "We cannot allow a pilot to make this kind of mistake, it is just not allowed. Even if the autopilot was working it is not allowed to do something like this. We cannot even allow people to enter the cabin, even if they are actors or actresses.

"We are a serious company and we are deeply saddened about the fact that one of our staff behaved in this way. Flight law dictates visitors are not allowed to enter the cabin during the flight."