An airline pilot who drank a bottle of vodka before a flight has been jailed for eight months.

Miroslav Gronych appeared to pass out in the cockpit with his face resting on the window of a Sunwing Airlines plane in Calgary, Canada, on December 31.

The 37-year-old Slovakian had a blood alcohol level three times the legal limit and was escorted off the plane before the flight to Cancun, Mexico.

The married father-of-two has since lost his job and, as well as being jailed, has been banned from flying for one year after his prison release.

A court heard that when Gronych got on the plane, he struggled to hang up his coat, was slurring his words and was staggering.

He was told by the co-pilot to leave the plane, but eventually returned to the cockpit, sat down and appeared to pass out.

Gronych admitted having care and control of an aircraft while over the alcohol limit.

Prosecutor Rosalind Greenwood was pleased with the sentence, saying: "It is a clear message to pilots that if you drink alcohol and you fly a plane, you're going to be met with a period of incarceration."

Gronych's defence lawyer said he couldn't sleep the night before the flight and felt like he was coming down with a cold. He had a couple of shots of vodka and a Tylenol, and planned to wake up in time to let people know he wouldn't make the flight.

But he didn't set an alarm and was awakened by a call asking him where he was, his lawyer said. Gronych drank the rest of the bottle of vodka and left for the flight.