The pilot of a Canadian airliner went to the bathroom, and couldn't get back into the cockpit.

The crew of Air Canada's Jazz subsidiary had to remove the door from its hinges to get him back in.

The incident occurred on a flight from Ottawa to Winnipeg, Canada.

Jazz spokeswoman Manon Stewart says the pilot went to the washroom when the flight had only 30 minutes to go.

She says the door would not open when he tried to get back into the cockpit.

Stewart says, "The door malfunctioned ... this is a very rare occurrence."

She adds that the crew's removal of the door was in conjunction with company policy.

The Ottawa Citizen newspaper reports that for about 10 minutes, "passengers described seeing the pilot bang on the door and communicating with the cockpit though an internal telephone, but being unable to open the door".

Stewart disputes the paper's report, saying it was "a bit dramatic."