When the first few sycamores began dying in UC Irvine 's Aldrich Park in late 2014, the victims numbered in the dozens. But over the next several months, hundreds of cottonwoods, native willows, goldenrain and coral trees met the same fate.

"We've seen infestations of pests, but nothing to this extent," said Richard Demerjian, director of UCI's Office of Environmental Planning and Sustainability. "It came as quite a shock."

It was the work of the polyphagous shot-hole borer, an invasive beetle that's been attacking and killing an astonishing range of trees throughout Southern California.

Plant pathologists are overmatched. The beetle isn't native to the area and has no natural predators here. When it strikes, the only thing to do is to try and contain it before it spreads. As the beetle has spread farther into six counties, even that has seemed like a losing strategy.

But the UC Irvine outbreak presented scientists with an opportunity to change that — by turning the leafy grounds into a giant outdoor research lab.

A dying California Sycamore tree at the UCI campus. (Glenn Koenig / Los Angeles Times)

The university, after all, is home to researchers who design malaria-fighting mosquitoes and hunt for dark matter in distant galaxies. Why not apply the scientific process to the campus itself?

"The beauty of UCI is that it's a university, and they're used to researchers," said John Kabashima, an environmental horticulture advisor at the UC Division of Agriculture and Natural Resources who is involved in the effort.

Dozens of trees around the campus now bear white tags that say, "This tree is part of a joint UC research project. Please do not touch or climb on the tree."

One of the scientists running this giant experiment is Akif Eskalen, the plant pathologist who first identified the sesame seed-sized beetle in a South Gate avocado tree in 2012. He's been studying infested plants about 45 miles away at UC Riverside .

At UC Irvine, with so much devastation concentrated in one place, the conditions are practically tailor-made for a controlled study to test different chemical and biological treatments using the same kind of trees growing under the same environmental conditions. With any luck, the results will help Eskalen hone his response to the wily pest.

The beetles burrow tunnels into trees, ejecting a sawdust-like frass behind them. They use the empty space to farm several species of fungus, which they eat and feed to their young. But the fungus also spreads through the tree's system, ultimately killing it.

A quick inspection is enough to make the scientists feel like underdogs. Eskalen pulled out a pocketknife and scraped the bark off several trees, revealing bore holes beneath.

Dr. Akif Eskalen inspects an infected California Sycamore at UCI in January. (Glenn Koenig / Los Angeles Times)

The university has identified 2,000 infested trees, many of which will have to be cut down. Many now resemble amputees, their main branches or entire tops lopped off. Some 400 hardwoods on campus were so badly mauled that officials have already removed them.

Nearly every sycamore in sight bears some kind of wound, and the damage is more than cosmetic. Heavy branches, structurally weakened by the relentless attack, pose a threat to public safety if they fall.

After trees die, their wood can become a hazard as it's hauled away, giving the beetles a free ride to new territory.

There's an economic risk too, since the beetles have a taste for avocado trees. It's also not clear what will happen if — or when — the beetle moves into the Central Valley, California's agricultural heartland.

At UCI, Eskalen selected 130 sycamores for his experiment and divided them into 13 groups of 10. Four of the groups were treated with different insecticides; three were treated with different fungicides; and four others got one of each.

Another group was given a beneficial bacteria found in some California trees that's thought to kill the fungus.

The final group served as a control and received no treatment at all.

To keep track of how well each intervention works, researchers are counting the holes the beetles leave in each tree. Each dot is a literal data point.

Akif Eskalen marks the beetles' entry points. (Glenn Koenig / Los Angeles Times)

These pinpoint wounds are marked with a different color of paint every month, to help the scientists see how many holes are freshly drilled. Any unmarked holes are a sign that the beetles are still drilling.

The scientists are allowed to cut down and section the trees, sample them, and even leave some infested trees alone. Having this flexibility is essential to understanding the success — or failure — of a given pesticide, Kabashima said: "That's why we're learning so much here at UCI."

Like lots of high-level research, there's quite a bit of grunt work. On a recent sunny day, Eskalen checked in on Joey Mayorquin and Beth Peacock as they painted blue dots on the paper-thin bark of a sycamore in Aldrich Park. Nearby trees are speckled with orange, white and green — flecked with so many colors that they bear a vague resemblance to a Georges Seurat painting.

Mayorquin, a UC Riverside graduate student, knelt at the tree's base while Peacock, a UCR research assistant, used a stepladder to reach higher. Both daubed blue dots next to each new hole and used clickers to keep count of them.

"It is very time-consuming," Mayorquin said. "We actually made good time last week when we were here; we were able to get through 40 trees in about a full day."

Soon after he started the experiment, Eskalen began to worry that his dot-painting procedure wouldn't tell him which holes were empty and which ones were occupied. After a sleepless night, he finally came up with an additional strategy.

To see which holes were in active use by beetles, the researchers painted white rectangles that were about the size of a sheet of printer paper on the bark. Some paints were too thick; others left the wood discolored. After several tests, he settled on a water-based latex paint that would not interfere with the beetles' drilling and would wash off without hurting the tree. Eskalen knew that the mother beetles guarding their young inside couldn't stand to have their only means of entry and exit clogged up. And indeed, they burrowed out of the holes that had been covered with paint — revealing those holes that were still in use.

The polyphagous shot-hole borer. (Glenn Koenig / Los Angeles Times)

"That's why it's very important for us to study the biology of the enemy," he said.

Eskalen checked one of the painted white patches. He points to numbers scribbled on the bark from early in the experiment. On Oct. 23, he'd counted 25 new holes. On Oct. 27, only 20 were active.

The researchers also used 3D-printed traps designed by UC Riverside entomologist Richard Stouthamer and colleagues to catch beetles that come out of their holes. The researchers don't even need beetles to fall into the traps; if they catch any frass the team will know the hole is active.

The team has been monitoring these trees since June; this June they will gather all the data and analyze their results, and continue monitoring for a few more years. Eskalen hopes they will lead him to a chemical or microbial weapon that could help beat back the infestation.

The scientists expect that any ammunition they find here will also help them fight an invasion by the Kuroshio shot hole borer, a closely related species of beetle with its own fungi that has opened up a second front in San Diego County and established a foothold in Orange County.

On the highly monitored and manicured campus, UC Irvine's trees are relatively lucky; in wilder areas the beetle has gone unchecked, ravaging natural habitats. A four-mile-wide willow forest in the Tijuana River Valley now has 140,000 severely damaged trees, according to John Boland, an ecologist who has been studying the area for more than 14 years.

Despite all this effort, Eskalen doesn't believe pesticides are a long-term solution — they're expensive and require repeated applications, which may not be feasible in many of the wild, thickly wooded areas under attack.

Ultimately, he said, the only way to defeat the bugs is to identify and deploy another creature that naturally preys on the beetle or its fungi.

Although the beetle infests trees in many parts of Southeast Asia, it does not run rampant there the way it has in Southern California. Eskalen and Stouthamer suspect it has predators there that keep it in check naturally, and they've gone to Vietnam and Taiwan to search for them.

The dying leaves of an infested tree at UCI. (Glenn Koenig / Los Angeles Times)

Finding them would just be the first step. Before they could bring them to California, they'd have to study them there to ensure they don't attack California's beneficial native insects.

In the short term, the best-case scenario for UCI is to manage the pest without allowing it to spread. With some 30,000 trees remaining on campus, Demerjian is prepared for a lengthy fight.

"This is going to be a pest that we're going to have to deal with for many years," he said.

amina.khan@latimes.com | Twitter: @aminawrite