HONG KONG — Tensions between China and Myanmar deepened on Saturday when a Chinese military commander warned of a strong response unless Myanmar prevented warfare with ethnic rebel groups from spilling into Chinese territory.

The commander, Gen. Fan Changlong, a vice chairman of China’s Central Military Commission, issued the warning after four Chinese farmers died on Friday when a military plane from Myanmar dropped a bomb in China near the two countries’ border, Xinhua, the official Chinese news agency, reported. Myanmar’s forces have been fighting rebel forces in Kokang, an ethnic Chinese enclave next to the Chinese border.

“The top echelons in the Myanmar military must strictly control and restrain their forces, and there can be absolutely no repeat of such incidents,” General Fan told the commander in chief of Myanmar’s military, Senior Gen. Min Aung Hlaing, in a telephone call, Xinhua said. “Otherwise, the Chinese military will take resolute and decisive measures to protect Chinese people’s lives and property.”

General Fan repeated the Chinese government’s demand for a thorough inquiry by Myanmar of the bombing, and harsh punishment for those found responsible.