China said Defense Minister Wei Fenghe agreed with his Russian counterpart Sergei Shoigu on Friday that the two countries will bolster their military cooperation, amid their lingering tensions with the United States.

Their meeting in China came a day after senior officials of the so-called Quad grouping of four democracies -- the United States, Japan, India and Australia -- held an online meeting.

Undated supplied photo shows Chinese Defense Minister Wei Fenghe (front R) and his Russian counterpart Sergei Shoigu (front L) inspecting the two countries' joint military exercise. (From the Chinese Defense Ministry's official WeChat account)(Kyodo)

China and Russia's predecessor state, the Soviet Union, were competitors during the Cold War, as they were at odds over interpretations and practical applications of Marxism-Leninism, the ideology of 20th-century communism.

The two countries, however, have been deepening their ties of late as their relations with the United States have deteriorated.

Since U.S. President Joe Biden took office in January, Beijing has sparred with Washington over several issues including its alleged human rights violations in Hong Kong and Xinjiang as well as security challenges to Taiwan.

The U.S.-Russia relationship, meanwhile, has worsened to its lowest point in years following Moscow's annexation of Crimea from Ukraine in 2014 and its alleged meddling in U.S. elections.

The Chinese government also said Wei and Shoigu inspected a joint military exercise between the two nations, held from Aug. 5 through Friday in China's northwest Ningxia Hui Autonomous Region.