Bangor is on a mission to protect its ash trees from emerald ash borer, an invasive bug that could arrive in the city before the year is over. Four University of Maine forestry students spent the summer counting, categorizing and inspecting every single tree on public land in Bangor. Trees on private property, including residential yards, were not included.

In total, the students counted 8,574 trees, 20 percent of which are ash trees, according to Sophia Cameron, a masters of forestry student from the University of Maine’s School of Forest Resources. Ash trees are the second most common tree species found on public land in Bangor, just behind Norway maple. While counting the trees, the students were looking for signs of emerald ash borer, an invasive species of bug that, as larvae, eat away the inner layer of bark of ash trees.

That part of the tree carries water and nutrients up to the leaves, so when it’s damaged, the tree slowly dies. “This is going to be a much bigger issue than we can recognize,” said Aaron Huotari, Bangor’s public works director. “On a clear, dry, beautiful day, the trees just collapse under their own weight because they get so brittle.

That presents a danger to the public.” An ash tree has only a 2 percent chance of surviving an emerald ash borer infestation if left untreated. Losing 20 percent of its trees would likely wreak havoc on Bangor in surprising ways.

It would ravage the city’s stormwater management system and raise the temper.