The story of the Forest of Immortal Stories begins not so long ago, in 2019, when Elena-Mirela Cojocaru, beloved wife of Ion Cojocaru, mayor of the hamlet of Nucsoara, died after a struggle with cancer. Mr. Cojocaru himself soon fell ill with a heart ailment; as a remedy his doctor told him to walk in the countryside, 6,000 or more steps a day.

Nucsoara and its 1,222 inhabitants reside on the forested slopes of the Carpathian Mountains in Romania. The Carpathians are a land of fog, fictional vampires and real-life wolves, as well as several thousand brown bears and roughly two-thirds of the remaining virgin forest in Europe.

Mr. Cojocaru had grown up in Nucsoara, but only as he walked the hills and ancient pastures did he notice the trees: beeches, phantasmagorically gnarled giants, some as old as 500 years.

“The mightiness of these trees is mind-blowing,” said Christoph Promberger, executive director of Foundation Conservation Carpathia, a nonprofit organization that is working to create a national park in the region. Five thousand solitary secular beeches still grow around Nucsoara, the highest concentration in Europe. But logging and changing uses of the land pose a threat. Bark beetles are moving in, too.

Mr. Cojocaru and the nonprofit group began discussing a plan to protect the beeches and perhaps draw ecotourism to Nucsoara. Two thousand five hundred and forty-four trees were identified — Mr. Cojocaru chose 2,544 because it is the height in meters of Moldoveanu Peak, the highest mountain in Romania and a day’s hike from Nucsoara. Each was given a number plate, photographed through the seasons and marked on a map with its GPS coordinates. The trees are offered for adoption on a website — although as Mr. Cojocaru insists, the tree adopts the person, not the other way around.

At one point a team from Forest Design, a forestry firm in Brasov, came with hand-held scanners that use lidar, a laser technology, and generated three-dimensional images of many of the ancient trees, inside and out. Digitally captured, each tree appears as fully individual as a fingerprint, and scientists can precisely track its growth and change.

Number 22 is a gift from one friend to another, a snippet of a poem by the Pakistani poet Faiz Ahmed Faiz: “Give some tree the gift of green again. Let one bird sing.”

Number 2544 has adopted Ion Cojocaru.

“I get a feeling of reciprocity,” Mr. Cojocaru said of the trees. “I learn from them. I get a sense that they are old men who are very wise and want me to do good.”