Even as they celebrate the thriving giant panda cub at the National Zoo, many scientists and environmentalists are increasingly hopeful about the prospects for the species in the wild bamboo forests of China, a startling turnaround from their gloomy outlook a decade ago.

They base their optimism on a recent census that found more giant pandas than previously believed, on expanded Chinese government protections for the rare black-and-white bear, and on an infusion of U.S. money into conservation projects.

"There are more pandas surviving in the wild than we thought before," said Karen Baragona, who heads the giant panda program of the World Wildlife Fund, which has worked in China since 1979. "The population seems to be much more stable, and the prospects for making major progress are excellent."

Giant pandas are endangered chiefly because their living space has been eaten up by logging, farming and other human activities. Baragona and others emphasized that the situation remains fragile, threatened by the explosion of population growth and economic development in southwestern China -- the only place where the animal lives in the wild. The giant panda, one of the world's most endangered animals, still demands an extraordinary level of permanent protection, they said.

At the same time, the number of captive giant pandas has grown because of improvements in breeding that are producing more cubs. There are now about 160 captive animals worldwide. Chinese officials say that when that population grows large enough, they hope to try to reintroduce some captive-born animals into the wild.

Not long ago, the giant panda's chances appeared to be dwindling. A count in the 1980s had found only 1,000 of them in the wild. More than half their habitat in Sichuan province was destroyed in the 1970s and 1980s. In the early 1990s, there were only a few protected panda reserves.

Giving one reason for hope, the Chinese government and the World Wildlife Fund announced last year an updated count that tallied nearly 1,600 pandas in the wild.

Despite the higher number, most scientists believe the panda population may actually have remained stable since the previous count in the 1980s. The most recent survey probably did a better job of finding animals, they said. But in any event, they said, the numbers may no longer be declining.

"The pandas are more secure than they've ever been," said Donald Lindburg, head of the giant panda team at the San Diego Zoo. "The Chinese have learned the whole world is watching, now more so than in the past."

Advocates are also cheered that the Chinese government has established a growing number of giant panda reserves -- up from 13 in the early 1990s to 56 this year. The reserves protect about half the country's giant panda habitat in Sichuan, Gansu and Shaanxi provinces. Logging, livestock grazing, hunting and the collection of medicinal herbs are prohibited on reserve land.

U.S. money plays a growing role. Funds began pouring into China from U.S. zoos after giant panda loans resumed in the late 1990s. As a condition of getting their pandas, the four zoos that exhibit the animals are required to spend $4 million a year on projects in China to conserve the species in the wild, though some of the money has been held up because of disputes over how it should be spent.

The reserves are a growing focus of zoo spending. The National Zoo has sent scientists to train panda reserve staff in computer mapping, bear ecology, radio tracking and other skills.

"It used to be it was considered the dregs of a job to be sent off to the mountains to count pandas," said David L. Towne, chairman of the Giant Panda Conservation Foundation, funded by U.S. zoos. "Now, with some resources and national and international attention, it's become a little more respected."

The reserves are attracting an increasing number of Chinese and international tourists, raising revenue for preservation efforts but also concerns about the visitors' environmental impact. At the Wolong reserve, where the National Zoo's pair of pandas were born, busloads of tourists arrive from Chengdu, the Sichuan capital 90 minutes away. But Baragona said other, more remote reserves offer lower-impact eco-tourism.

The Chinese government has banned logging in most of its forests, including all of the country's panda habitat. The ban, imposed in 1998 after disastrous flooding, was intended to stop severe erosion, but it has benefited pandas, too. The ban is supposed to end in 2008, but environmentalists hope it will partially stay in place. The government also has a program to restore forests that had been converted into farmland and to protect corridors of forests that pandas can use to travel between reserves.

Yan Xun, an official in the Chinese State Forestry Administration, said in an interview that there can be competition between economic development and the panda's habitat needs. He said China increasingly recognizes that economic development -- for example, the construction of a highway or dam -- needs to be done with consideration of the pandas' needs.

Yan led a delegation of Chinese officials who attended the naming ceremony here last month for Tai Shan, the National Zoo's giant panda cub. Their visit was part of a tour of U.S. zoos that house pandas. It included meetings with zoo officials.

Baragona, who visited China recently, said she was shown a new highway that cuts through panda habitat, but "they retained the forest up to the edge of the highway" rather than cutting it back severely. She said the road was designed with no shoulder to keep it as narrow as possible.

Despite the money going into panda projects, some scientists hesitate to say that the animal's situation has improved. David Wildt, a National Zoo senior scientist who is editing a book about giant panda research, said that "no one knows how many giant pandas are out there" because the animals are so elusive. Even the new census number, he said, is a "guesstimate."

National Zoo scientists have set up two panda reserves cameras that are triggered to shoot pictures when animals walk by. "We're seeing photos of giant pandas, but we expected to see more," Wildt said. Although "we don't know what all that means, it gives us some concern."

At the very least, experts are optimistic that the money and skills poured into panda conservation these days by environmental groups, the Chinese government and zoos will have an impact, whether or not it turns the tide in the animal's favor.

"Do we have a lot of challenges ahead? Yes. By taking that much land away from the people, there will be lots of people and land conflicts," said John Ouellette, the giant panda field and research coordinator for the Memphis Zoo, which is working with the Chinese government on an initiative to encourage healthy forests and economic development at the same time. But he added: "It's an exciting time. There are lots of possibilities."