An elderly Australian man was killed Sunday after he crashed into a fence while riding his bike — with the fatal collision reportedly a result of his efforts to avoid a swooping magpie.

The unidentified 76-year-old was riding his bike on a path in Nicholson Park in Woonona, New South Wales, around 8 a.m. when he started to ride outside the path to get away from the bird, witnesses told police.

"The man then collided with a fence post, causing him to be thrown to the ground, sustaining serious head injuries," authorities said in a press release on Monday.

SWOOPING MAGPIE SHOT BY AUSSIE COUNCIL AFTER DOZENS OF ATTACKS

The man was treated at the park before being airlifted to a hospital in critical condition. He later died, police said.

Investigators are looking into the incident, but magpies are known to "swoop" around strangers during mating season — and can even become aggressive and attack humans crossing their territory. One magpie had recently caused problems in New South Wales among a community who felt threatened by the bird.

The "monster" magpie who was terrorizing people in Sydney earlier this month was shot down on the orders of neighborhood officials, Australia's ABC reported at the time. The Australian magpie is a variant of the European bird of the same name.

The bird was "very aggressive and uncharacteristically territorial" and went so far as to try to swoop in underneath cyclists' helmets.

Magpies swoop when they feel threatened — particularly when strangers walk near their homes, according to Gisela Kaplan, who studies the birds at the University of New England.

CLICK HERE TO GET THE FOX NEWS APP

"Magpies are smart enough to recognize people and their habits and won't swoop anyone they've come to know and trust," she told 7News. "But put a stranger near them and the male begins to ask, 'Is there a risk to my young?'"

Australia has a website called "Magpie Alert" that tracks aggressive swooping magpies throughout the country.

Fox News' Morgan Phillips contributed to this report.