An "aggressive" and "uncharacteristically territorial" magpie in Sydney's north west has been shot dead after a council decision that has split the local community.

Key points: The Hills Shire Council unsuccessfully tried to relocate the magpie

The Hills Shire Council unsuccessfully tried to relocate the magpie One resident said he sustained a heart attack during a particularly vicious attack last year

One resident said he sustained a heart attack during a particularly vicious attack last year Wildlife lovers feel the bird did not deserve to die for exhibiting natural behaviour

Over 40 complaints have been lodged with the Hills Shire Council about the magpie, which was infamous in Bella Vista for its attacks on Old Windsor Road in the past three years.

Some of its victims have required hospital treatment.

Hills District Council and National Parks and Wildlife Service (NPWS) decided to kill the bird rather than endure another nightmare spring swooping season.

The bird was deemed a "significant risk to public safety" and an assessment by NPWS found the bird was engaging in different behaviour to regular protective swooping.

"[It was] swooping underneath helmets ... to attack people's faces," a council spokesperson said in a statement.

"This bird was very aggressive and uncharacteristically territorial."

Space to play or pause, M to mute, left and right arrows to seek, up and down arrows for volume. Watch Duration: 22 seconds 22 s The magpie liked to target cyclists in the area.

Greystanes resident Peter Danieluk says the magpie was responsible for giving him a heart attack last year during a swooping frenzy.

"I had my first heart attack in 2014 which reduced my heart function ... so while trying to defend myself as it would strike, the adrenaline rush caused my heart and lungs to fill with blood and cause another heart attack," he said.

Sorry, this audio has expired The five-second solution to swooping magpies that doesn't involve a gun

"It just did not stop, even as I was losing consciousness on the ground."

The bird was even nicknamed the "Windsor Road Monster" and the "Circa Marauder", as it was known to swoop from the direction of Circa Boulevarde.

The council made several unsuccessful attempts to relocate the bird, so NPWS issued a permit for it to be shot.

The Hills Shire Council spokesperson said the decision to euthanise was not taken lightly and done under the supervision of NSW Police.

"Council does not usually take action to remove or destroy magpies — the usual procedure is to signpost known risk areas as birds are generally only aggressive for four to six weeks per year," they said.

The magpie was notorious in the community and attacks were recorded on online forums. ( Supplied: Magpie Alert )

This last-resort option has divided the community.

The Animal Justice Party's local branch said people were disgusted an iconic Australian species had been targeted.

Member Heidi Vasilevskis said the bird's death would put a whole family of magpies at risk.

"This parent bird was a food source for new chicks ... I am outraged and upset beyond words," she said.

"I truly fear for the future of our unique and precious animal life."