BEIJING (Reuters) - China on Thursday confirmed it would send warships to join a major U.S.-hosted naval drill this summer, even as tension between the world’s two largest economies mounts over the South China Sea.

More than 40 ships and submarines representing 15 international partner nations travel in formation in the Pacific Ocean during the Rim of the Pacific (RIMPAC) 2014 exercise in this U.S. Navy photo taken July 25, 2014, and released July 31, 2014. REUTERS/U.S. Navy/Mass Communication Specialist 1st Class Shannon E. Renfroe/Handout

The Rim of the Pacific exercise, known as RIMPAC, is billed as the world’s largest international maritime exercise, held every two years in Hawaii in June and July.

Critics of the Obama administration, including U.S. Senator John McCain, have said the U.S. should bar China from the drills to show U.S. disapproval of its military actions.

The U.S. and its allies have expressed growing concern over the Asian giant’s military buildup, as well as its increasingly assertive posture in the South China Sea.

“Joining these military exercises will be beneficial to improving the Chinese navy’s ability to contend with non-traditional security threats,” Wu Qian, a spokesman of China’s Ministry of Defense, told a regular briefing.

“At the same time, it will also be beneficial to depending China and professional exchanges and pragmatic cooperations with the relevant countries’ navies.”

China would send warships to participate, Wu said, but did not say how many or what kind.

“Needless to say, military relations between China and the U.S. have some difficulties and obstacles,” Wu added.

He cited the examples of U.S. arms sales to Taiwan and reconnaissance by U.S. warships near Chinese territory, as well as what China sees as discriminatory laws by the U.S. limiting military exchanges.

Wu also criticized U.S. patrols in the South China Sea.

U.S. Admiral Harry Harris, chief of the U.S. Pacific Command, has said he wants to build ties between the two militaries of the countries, but has also strongly criticized China’s actions in the South China Sea.

Past participants in RIMPAC have included nations such as Russia that are not treaty allies with the United States.

China took part in the RIMPAC exercises in 2014 with more than 20 countries, but defense officials have said its participation was limited to areas such as humanitarian relief and search and rescue operations.