SANTA CRUZ — Monarch butterflies nearing extinction from the West Coast could find a lifeline in a new state program signed into law by Gov. Jerry Brown on Thursday.

The Monarch Butterfly and Pollinator Rescue Program will offer grants and technical assistance to willing farmers and landowners to protect and restore the bugs’ vanishing habitat.

Without intervention, scientists predict monarchs will go extinct from the West Coast within 20 years.

The program was put forward by Assemblyman Mark Stone, D-Scotts Valley, as Assembly Bill 2421. Stone said he came to the issue in part because of his district’s close connection to the orange-and-black butterflies that winter in coastal eucalyptus groves in Pacific Grove and Santa Cruz.

Monarchs, Stone has said, are “part of our identity” on the Central Coast, but benefiting other native pollinators such as bees is also a key aim.

In 1980 more than 10 million of the bugs wintered in California, but driven by habitat loss, that number has since plummeted to about 147,000 in the fall of 2017 — fewer than used to flock to Natural Bridges State Beach alone in the 1980s. Last year, just 9,000 monarchs were counted at the state park’s Monarch Grove.

After wintering along the coast, monarchs migrate inland to find a milkweed plant on which to lay their eggs, the only plant that a monarch caterpillar can eat.

Grasslands once thick with milkweed have been decimated by settlement, agriculture and even climate change, according to Eric Holst, vice president of working lands at the Environmental Defense Fund, a sponsor of the bill.

Much of that grassland is unlikely to ever be restored, but Holst said even a modest amount of restoration on the edges of fields and roads and in unused farmland could make a sizable impact.

Many farmers, according to Holst, have already shown interest, and the bill was backed by the California Farm Bureau.

“There’s a lot of interest in helping pollinators, particularly the monarch,” Holst said. “They’re such a high-profile — frankly beautiful — icon of conservation nobody wants to see it extinct. The questions I get from farmers are not should I do this but how do I do it.”

The details of how the new program will give out grants and technical assistance remain to be seen, but the effort will be kickstarted by $3 million in funding set aside in this year’s state budget.

“All of that takes money to implement, but also money to plan, and all of that’s possible under this fund — it just depends on what that particular landowner wants to do and what resource or help they need in order to accomplish it,” Stone said.

Supporters are hoping to see further investment pour in from the federal government and private sector in coming years as the program demonstrates success.

The Monarch and Pollinator Rescue Program is to be managed by the state Wildlife Conservation Board, which is expected to release guidelines for grant applications and technical assistance early in 2019.