File photo: A Royal Canadian Mounted Police cruiser sits outside the Reptile Ocean exotic pet store in New Brunswick, Canada, where two boys were killed by an African rock python while they slept last month.

Montreal - The owner of a python which is thought to have crushed two boys to death in a Canadian apartment did not have a permit to keep such an animal, officials said.

Brothers Connor and Noah Barthe, aged 6 and 4, were found dead on Monday morning in an apartment in the eastern Canadian city of New Brunswick, above a pet shop.

The pair had been enjoying a sleepover with a friend, the young son of Jean-Claude Savoie, who tends to a private menagerie of exotic animals, including an African rock python.

Police are treating the apartment as a crime scene and an investigation has been launched into how children became exposed to a four-metre-long, 45kg snake.

“It is illegal for anyone to keep any exotic species that is not listed in the regulation unless they have a permit,” Canada's department of Natural Resources said in a statement to state broadcaster CBC.

The provincial government of New Brunswick, meanwhile, said said no permit had been issued for Savoie's python and the Royal Canadian Mounted Police said officers were investigating whether the snake was legally owned.

The initial police investigation suggests that the snake managed to escape from its terrarium in Savoie's apartment by nosing through a ventilation duct in the ceiling and dropping into the boys' bedroom nearby.

The brothers had spent a day playing with their friend, Savoie's son, and the family's various animals - including llamas and goats - before bedding down for the night on a mattress in his home.

Savoie found the young victims dead on Monday morning and alerted the authorities. Veterinary officials seized the snake and euthanised it.

Animal experts have expressed astonishment at the tragedy, many of them noting that, while an African rock python is a dangerous animal capable killing large prey, it would not normally attack humans.

But Marion Desmarcheliere, a professor of zoological medicine and the Atlantic Veterinary College, told AFP the children's day of play could have sealed their fate.

Pythons, she said, have a powerful sense of smell, and if the Barthe children still had the odour of goats upon them after their time in Savoie's mini-zoo, this could have awakened the snake's hunting instinct.

“Pythons kill to eat,” she said, adding that they cannot see very well at night and would have been guided by smell and by the body heat of the young victims.

Police said the snake was a rock python, also known as a python sebae, the biggest snake species in Africa. It is not poisonous, but is hugely strong and capable of killing large animals including antelopes.

It is not known as a man-eater in the wild, but it is widely feared.

The deaths have triggered a debate about Canada's patchwork of laws relating to exotic pets, with overlapping federal, provincial and local regulations leading to confusion over ownership and safety rules. - Sapa-AFP