For decades, American zoos have raised tens of millions of dollars from donors and sent the money to China for the right to host and display pandas. Under U.S. law, those funds were required to be spent protecting pandas in the wild.

But the Chinese government instead spent millions on apartment buildings, roads, computers, museums and other expenses, records show. For years, China refused even to account for millions more.

Regulators with the U.S. Fish and Wildlife Service, which oversees the payments, have for two decades raised concerns about this with American zoo administrators and Chinese officials alike. The U.S. government, on three occasions, froze payments to China over incomplete record keeping, documents show.

Zoos, too, have known that the money was not always going toward conservation. But they worried that if Fish and Wildlife cut off the money altogether, China could demand the return of its bears. Zoos count on pandas for visitors, merchandise sales and media attention.

Ultimately, the regulators allowed the money to keep flowing and agreed not to check the spending in China so thoroughly, according to records and former officials.

“There was always pushing back and forth about how the U.S. shouldn’t ask anything,” said Kenneth Stansell, a former Fish and Wildlife official who traveled to China throughout the 2000s to discuss pandas. He said his Chinese counterparts argued that “it shouldn’t be of any concern to the U.S. government.”