More than 20 years of habitat restoration and breeding programs have helped the endangered Karner blue butterfly make a comeback in the pine barrens of upstate New York where it was discovered by Russian author Vladimir Nabokov decades ago.

"This project has been unbelievably rewarding," said Neil Gifford, conservation director for the 3,200-acre Albany Pine Bush Preserve. "Getting to see an animal that was on the brink of extinction locally, now have a robust and healthy population, is just incredible."

The silvery blue, postage stamp-sized butterfly that was among the first species on the federal endangered list in 1973 is also making a comeback in parts of Ohio and New Hampshire where it was thought to have been wiped out before 2000. Populations have persisted in Wisconsin and Michigan.

The outlook is less sunny in some other parts of the butterfly's former range from Minnesota to New England. At Indiana Dunes National Lakeshore in Indiana, extensive work to restore and expand the butterfly's sandy, savannah-like habitat has come to naught.

"The population over the last 15 years has declined to the point where we're pretty concerned that it's been lost from this area," said Ralph Grundel, a biologist with the U.S. Geological Survey in Porter, Indiana. The reasons are elusive.

According to the U.S. Fish and Wildlife Service, the Karner blue has declined by 99 percent over the past 100 years, with 90 percent of the decline occurring in the last 15. Among the reasons are habitat loss from land development and suppression of the wildfires that are a necessary part of the ecology of the pine barren and black oak savanna where the insects live.

The Karner blue is still found in the Pine Bush just west of Albany where it was discovered by Nabokov in the 1940s. The author of "Lolita" was also a notable butterfly expert who played a key role in establishing the relationship between the Karner blue and its dwindling habitat. His research was at the heart of the discussion of habitat and restoration provisions of the Endangered Species Act passed by Congress in 1973.

Recovery efforts focus on restoring the original pine barrens ecology by removing non-native trees such as black locust, burning the landscape to destroy invasive plants and help fire-dependent species like pitch pine and scrub oak, and planting plenty of blue lupine, the only plant Karner blue larvae eat.

Scientists have also partnered with New Hampshire officials in a captive breeding program since 2001. New York sends adult Karner blues to New Hampshire each spring, and New Hampshire returns some of the pupating larvae back to Albany to be hatched and released.

Butterflies have been released at 21 sites and have naturally colonized other sites in the preserve. The number of Karner blues has gone from about 200 in 1991 to more than 14,000 now, Gifford said.

The federal threshold for recovery is a population above 3,000 in four of five consecutive years. Gifford said the recovery goal is likely to be met next year.

At Indiana Dunes, habitat restoration hasn't been enough to save the Karner blue. When he started working there 20 years ago, Grundel said there were 5,000 to 10,000 Karner blues. Only two were found in 2014 and none this year. An unusually warm spring and dry summer in 2012 are one explanation, as lupine growth cycles were out of sync with Karner blue larvae hatching. But the numbers were plummeting before then.

"People are concerned," Grundel said. "There's a recognition that we need to do more research to better pinpoint the causes for the decline."