At stake are hundreds of millions of dollars for programs to reduce the incidence of tuberculosis, prevent and treat H.I.V. infections and wipe out malaria. China has received $539 million from the Global Fund since 2003, according to the fund’s Web site. An additional $295 million is in the pipeline, making China the fund’s fourth largest recipient behind Ethiopia, India and Tanzania, one global health expert said.

A decision by the Global Fund to pull out of China would be hugely embarrassing for the Chinese government because it would suggest that China was unable to meet the standards of an international organization that dispersed funds to far less sophisticated governments. The fund can terminate grants that have been mismanaged or short of that, formally suspend them. Suspension is a harsher step than halting payments and sets up a series of major obstacles to the release of additional funds.

Those more punitive measures seemed to have been averted Friday after two days of tense meetings between officials from the fund and the government. Jon Liden , a spokesman for the Global Fund, said China agreed Friday to a number of stipulations on how money would be used and monitored. “We came to a point where we needed to make clear signals to China,” he said. “We seem to share an understanding of the way forward.” This week, sources familiar with the negotiations said China pledged to the Global Fund that it would repay any funds that were misspent. But some fear that the inclusion of civil society groups in the health effort may still be an issue.

The meetings took place against the backdrop of growing questions over whether China should be allowed to benefit from the fund’s largesse. As a middle-income country, China qualifies for grants, as do Thailand, India, the Philippines and a number of Latin American countries. Unlike poorer countries, those nations are expected to contribute a certain percentage of the cost of the programs financed.

But China’s huge success in winning awards — coupled with growing evidence of the government’s deep pockets — has inspired fiery criticism, including from Jack Chow, a former first assistant director general of the World Health Organization who helped create the Global Fund. Dr. Chow, now a professor at Carnegie Mellon University, has argued that China’s Health Ministry seeks aid only because the Chinese government chooses instead to lavish funds on “hard power” agencies or to invest it in other sectors.