SIHANOUKVILLE, Cambodia—China has signed a secret agreement allowing its armed forces to use a Cambodian navy base near here, as Beijing works to boost its ability to project military power around the globe, according to U.S. and allied officials familiar with the matter.

The pact—signed this spring but not disclosed by either side—gives China exclusive rights to part of a Cambodian naval installation on the Gulf of Thailand, not far from a large airport now being constructed by a Chinese company.

Some details of the final deal were unclear, the officials said, but an early draft, seen by U.S. officials, would allow China to use the base for 30 years, with automatic renewals every 10 years after that. China would be able to post military personnel, store weapons and berth warships, according to the draft.

Military operations from the naval base, airport, or both, would sharply increase Beijing’s capacity to enforce territorial claims and economic interests in the South China Sea, to threaten U.S. allies in Southeast Asia and to extend its influence over the strategically important Malacca Strait.

Chinese and Cambodian officials have denied there are any plans for a Chinese military base in the country. “Nothing is happening like that,” Phay Siphan, a Cambodian government spokesman, said on Friday. He called it “fake news.”