Fredericton city officials had to kill a swarm of bees on Wednesday evening after about 400 of them blocked off part of the city's walking bridge.

The city was getting reports that at least 10 people had been stung, Don Murray, the city's forester, told CBC News.

The bees were agitated and stinging people because someone had apparently stepped on the swarm, killing a couple hundred of them, he said.

'They find an area to stop until they find a permanent home and in this case, it happened to be about dead centre on the walking bridge.' —City forester Don Murray

As a result, city officials felt they had to kill the rest of the swarm with a spray, Murray said.

Such swarms are not unusual, he said, noting he has come across a few swarms within city limits before, sometimes with thousands of bees.

"A hive will get crowded and overheated and the queen will actually pack up and leave and take her bees with her," Murray said.

"Most of them leave and they fly and they find an area to stop until they find a permanent home and in this case, it happened to be about dead centre on the walking bridge."

The swarm could have stayed around the walking bridge for hours before finding a new home if they city hadn't killed them, he said.

Murray advises anyone who encounters such a swarm to leave the bees alone.

"The worst thing you can do is hit them with a stick, or throw a rock through them, or disturb them because if it’s not you that gets stung, it’s some poor, innocent child on a bike or that’s walking through there. And you can’t outrun them," he said.