The Royal Alexandra Hospital has become a large bird cage for one unfortunate magpie.

A black-billed magpie has been trapped in the hospital's atrium for at least three weeks.

Gwen Lancaster first caught sight of the bird in mid-June when her mother was admitted for hip surgery. The distraught magpie was flying erratically near the top of the vaulted ceilings — squawking at the birds beyond the glass.

"It was really super stressed. Its mouth was open and it methodically went from window to window trying to figure out how it could escape, but it couldn't," Lancaster said.

'I'm going to feed it'

She doesn't know how the magpie got inside the hospital, but every time she went back to the garden, the bird was still there.

Lancaster decided that if it wasn't leaving, it at least needed to survive.

"By the third day … I just couldn't handle it any longer," she said.

"We honestly didn't think it would even make it to third day and when it did that's when I was like, 'I don't care if I get in trouble or not, I'm going to go feed it.' "

Lancaster took some watermelon from her mother's room and brought it down to the jailbird.

The pieces were gone later in the afternoon.

Watermelon lunch

At this point, word of the avian inpatient and its watermelon lunch started to circulate through the hospital. Cups of water appeared on the tiled floor and other visitors start to feed the bird, Lancaster said.

"About a week later the magpie is still there and tons of people are throwing food out to it now and there's water cups laying down there," Lancaster said. "If anything, it was entertainment. I mean, people really rallied around it."

The atrium, six storeys tall under a barrel-shaped glass skylight, is filled with lush flora, with enough space for the magpie to stretch its wings.

"You know, it's a pretty nice huge bird cage if you have to be in a bird cage I guess," Lancaster said.

This sign inside the Royal Alexandra Hospital asks staff and visitors to be on the lookout. (Hospital staff member) Without human caterers, the Pica hudsonia would struggle to survive in the absence of its regular diet of insects and scraps, according to Jocelyn Hudon, curator of ornithology at the Royal Alberta Museum.

"What happens this time of year is their young are just about ready to leave the nest," he said. "It would have been on the lookout for food … when you're looking for food, you take your chances."

About two weeks after her mother was admitted, Lancaster said, she and her brother suggested the staff set up a cage to catch and release the bird.

Lancaster didn't notice any cages when her mother was transferred to another hospital around the end of June, but it seems the hospital has set one up to catch the intruder.

A sign was placed around the atrium last week, according to a photo shared with CBC News by a hospital staff member. The sign asks staff and visitors to avoid feeding the bird and to contact the hospital if the bird is seen "inside the cage."

'Not unheard of'

In a statement sent to CBC News, a hospital spokesperson wrote, "Incidents like this are not unheard of and our staff are working to safely and humanely capture and release the bird."

While Lancaster hopes the magpie will return to its nest, she nonetheless enjoyed the feathered drama.

"It was a source of entertainment when Mother would fall asleep," she said.

"We'd go, 'Oh, let's go grab a coffee and see what the magpie is up to.' "

