Colorado cities are gearing up for a battle with a tiny insect that has the potential to kill tens of thousands of ash trees and cost millions of dollars in the process.

The midwestern city of St. Paul, Minn., offers a stark example of what's in store for metro-area communities now that the bug has been discovered in Boulder.

St. Paul — which discovered the emerald ash borer in its trees four years ago — is now spending a $1 million a year to remove and replace about a thousand ash trees per year and treat about 300 with pesticides to try to save them.

But with 40,000 ash trees on publicly managed property alone, the costs inflicted by the tiny green beetle from Asia are expected to only go up. St. Paul City Council President Kathy Langtry says her town will likely go to the state Legislature in spring for help footing the bill.

The insect can survive under the bark of ash firewood, and that's thought to be the most likely route it took to Boulder.

Emerald ash borer is the top insect nobody wants to have, said Colorado State University Extension entomology specialist Whitney Cranshaw. Adult borers munch leaves in the tops of trees, laying eggs that hide in bark crevices. Those eggs hatch, and the larvae burrow below the bark, disrupting its nutrient- and water-supplying layers, riddling them with serpentine tunnels.

Inside the tree, the larvae pupate, then hatch in spring and burrow their way out to feed and breed again, killing the canopy limb by limb and usually the whole tree in about three to five years.

The city of Boulder has an estimated 98,000 ash trees on both private and public land.

Altogether, the state department of agriculture estimates that 29 communities in the Denver metro area have 1.45 million ash trees. The estimate uses a USDA tree survey from March for the numbers of all trees in each city, then assumes that most tree stocks are 15 percent ash, so some cities' actual numbers of ash trees could be lower — or higher. Cities don't have to pay for ash solutions on private property.

Experts are optimistic the borer will spread more slowly in Colorado than it has in other states. Here, ash trees aren't native (though they have naturalized along a few creeks and ditches), and patches of ashless prairie often separate towns and punctuate urban forests.

Still, the cost could hit Front Range cities — and every homeowner in them with an ash tree — sometime in the next decade or so. Slowing the borer's advances will at least parcel those costs out across years.

It's unknown how far the insect has spread in Boulder, though foresters say they hope it may be limited to the six infested trees near 30th Street and Iris Avenue.

Finding the boundaries of the Boulder infestation is a quest in itself.

Using a painstaking technique developed by a Canadian forestry researcher, Boulder staff and a small army of borrowed and lent labor are removing two branches from up to 10 ash trees in every square mile of the city where ash trees exist on public property. On those branches, they then shave paper-thin strips of inner bark with old-fashioned, two-handled woodworking knives, looking for the flat, segmented, cream-colored larvae.

All this to map the movements of an enemy not much bigger than a grain of rice. Why?

Because for homeowners and for cities, spending money to treat or remove ash trees is pointless if they aren't within a few miles of a known infestation, because the insect can't fly very far.

That hasn't stopped some companies from trying to sell pesticide treatments this fall.

Anne Pienciak, the volunteer landscape manager for Red Fox Hills' homeowners association in Gunbarrel, got the pitch to treat her HOA's 33 ash trees before the first hard frost fell.

Red Fox Hills is about 5 miles from tree zero, and Pienciak's tree-care expenses have cost her $1,200 to $2,300 a year in previous years. She's gotten one quote for the cheapest pesticide treatment, which would cost $2,300. To use a trunk injection of the less-toxic pesticide that she prefers could cost her $6,600.

Per year.

"Sooner or later, this is going to be an expense for the neighborhood," she said, "whether we decide to treat the trees, slowly replace them or leave them unprotected and replace individual trees as they become affected."

Ballpark costs for a homeowner to treat just one ash tree will be comparable — a few hundred a year. To remove a tree, grind out the stump and replace it? Hundreds to more than $1,000, depending on the removed tree's size, accessibility and the new tree's cost. And it would hit all at once.

"It will have quite an impact, either pesticide treatments or tree removal," said Boulder City Forester Kathleen Alexander. "We're just now starting that analysis. But we've heard the stories from the Midwest communities, and we sort of know what we're in for."

In St. Paul, before the borer arrived, ashes towered as high as 50 feet over some east-side streets, creating a vaulted, shady canopy in Minnesota's humid summers, said council president Langtry.

"When my two ash trees in the backyard go," she said, "our cooling bill will go through the roof."

For her town, "it will change everything."

This fall along Colorado's Front Range, ash trees were in their copper and purple glory, offering yet another reason they were planted, often to replace the elms killed by Dutch elm disease.

"Oh, they're gorgeous," said Longmont's Wicklund of the ashes. "They're the No. 1 planted tree in town ... this could be really devastating."

Rockies are on pace to lose 93 games this seasonThe Rockies lost three of four in St. Louis and are on pace to lose 93 games as they come home for a three-game series with Seattle before going back on the road again to face Washington.