Mike Blake / Reuters A file photo of the USS John C. Stennis, which is currently patrolling the Western Pacific.

A Chinese observation ship shadowed the U.S. aircraft carrier John C. Stennis in the Western Pacific on Wednesday, as it joined warships from Japan and India for drills close to waters Beijing considers its backyard, the carrier's commander said.

The show of U.S. naval power comes as Japan and the United States worry China is extending its influence into the Western Pacific with submarines and surface vessels as it pushes territorial claims in the neighboring South China Sea, expanding and building on islands.

China has been angered by what it views as provocative U.S. military patrols close to the islands. The United States says the patrols are to protect freedom of navigation.

Tokyo on Wednesday said a separate Chinese navy observation ship entered its territorial waters south of its southern Kyushu island. China said it was acting within the law and following the principle of freedom of navigation.

"There is a Chinese vessel about seven to 10 miles away," Captain Gregory C. Huffman, commander of the Stennis, told reporters aboard the carrier after it recovered its F-18 jet fighters taking part in the exercise. The Chinese ship had followed the U.S. vessel from the South ChinaSea, he added.

Chinese Foreign Ministry spokesman Lu Kang said he was unaware of the situation.

Beijing views access to the Pacific as vital both as a supply line to the rest of the world's oceans and for the projection of its naval power.

The 100,000-ton Stennis joined nine other naval ships including a Japanese helicopter carrier and Indian frigates in seas off the Okinawan island chain. Sub-hunting patrol planes launched from bases in Japan are also participating in the joint annual exercise dubbed Malabar.

REUTERS/Franck Robichon/Pool Japan's Prime Minister Shinzo Abe (R) meets U.S. Navy Admiral Harry B. Harris Jr., Commander of the United States Pacific Command in Tokyo on Wednesday. The U.S is conducting joint exercises with Japan in the Western Pacific.

Deepening Alliances

The Stennis will sail apart from the other ships, acting as a "decoy" to draw it away from the eight-day naval exercise, a Japanese Maritime Self Defense Force officer said, declining to be identified because he was not authorized to talk to the media.

Blocking China's unfettered access to the Western Pacific are the 200 islands stretching from Japan's main islands through the East China Sea to within 100 km (60 miles) of Taiwan. Japan is fortifying those islands with radar stations and anti-ship missile batteries.

By joining the drill, Japan is deepening alliances it hopes will help counter growing Chinese power. Tensions between Beijing and Tokyo recently jumped after a Chinese warship for the first time sailed within 24 miles (38 km) of contested islands in the East China Sea.

The outcrops known as the Senkaku in Japan and the Diaoyu in China lie 220 km (137 miles) northeast of Taiwan.

Wary of China's more assertive maritime role in the region, the U.S. Navy's Third Fleet plans to send more ships to East Asia to work alongside the Japan-based Seventh Fleet, a U.S. official said on Tuesday.

For India, the gathering is an chance to put on a show of force close to China's eastern seaboard and signal its displeasure at increased Chinese naval activity in the Indian Ocean. India sent its naval contingent of four ships on a tour through the South China Sea with stops in the Philippines and Vietnam on their way to the exercise.

China claims most of the energy-rich South China Sea through which about $5 trillion in ship-borne trade passes every year. Neighbors Brunei, Malaysia, the Philippines, Taiwan and Vietnam also have claims.

(Additional reporting by Megha Rajagopalan in Beijing; Writing by Tim Kelly in TOKYO.; Editing by Lincoln Feast and Nick Macfie)