HONG KONG — China has denied an American warship permission to visit a Chinese port, the United States Navy said on Wednesday, an apparent reflection of flaring trade and military tensions between the two countries.

Cmdr. Reann Mommsen, a spokeswoman for the Navy’s Seventh Fleet, confirmed the denial in an email and referred further questions to the Chinese government. China’s Foreign Ministry and Defense Ministry did not immediately respond to faxed requests for comment.

The United States announced the denial in the same month that it said two American warships had also been denied permission to dock in Hong Kong, a semiautonomous Chinese territory. The latest denial, for permission to dock in the eastern Chinese city of Qingdao, was first reported by Reuters.

The moves come as the trade war between China and the United States intensifies, and after nearly three months of pro-democracy protests in Hong Kong, a financial hub that is essential to the Chinese economy. Beijing has, without providing evidence, blamed the Hong Kong unrest on foreign “black hands” that it says are bent on fomenting an uprising in the former British colony.