A Chinese spy ship followed a U.S. aircraft carrier while it participated in joint naval exercises with India and Japan. Here, the aircraft carrier USS John C. Stennis transits the Straits of Hormuz in this U.S. Navy handout photo, Nov. 12, 2011. REUTERS/U.S. Navy/Mass Communication Specialist 3rd Class Kenneth Abbate

A Chinese observation vessel closely followed U.S. aircraft carrier John C. Stennis in the western Pacific Ocean Wednesday as the U.S. ship participated in the ongoing naval exercises being jointly conducted by the U.S., India and Japan. The area where the exercises are being held is close to South China Sea, the entirety of which China has been claiming, even as other countries in the region oppose the claims.

The eight-day tripartite naval exercise, which began on June 10, is codenamed Malabar and is an annual feature between U.S. and Indian navies since 1992. Japan joined as a permanent participant in 2015. The exercise takes on significance in the face of aggressive Chinese claims in the South China Sea and worries that China will try to extend its influence in the western Pacific.

According to an anonymous officer from the Japanese Maritime Self Defense Force, John C. Stennis will sail apart from the other ships to draw the Chinese vessel away from the exercise, Reuters reported.

Early Wednesday morning, “a Chinese naval intelligence ship briefly entered Japan’s territorial waters,” the Associated Press reported, citing a Japanese government spokesman. Deputy Chief Cabinet Secretary Hiroshige Seko said the ship was spotted “in Japanese waters west of Kuchinoerabu island in southern Japan before dawn” and that it left about 90 minutes later. According to public broadcaster NHK, it was the first time since 2004 that a Chinese naval vessel was seen in Japan’s waters.

A day before the war games began, a Chinese naval vessel had sailed close to what Tokyo claims are Japanese territorial waters in the East China Sea. The vessel had come close to the disputed islands, which Japan calls Senkaku and China calls Diaoyu.

Other than John C. Stennis, which carries F-18 fighter jets, ships in the exercise include Indian frigates and a Japanese helicopter carrier.