YONAGUNI, Japan—China’s growing assertiveness toward Taiwan has triggered a public push by Japanese leaders to plan for a possible conflict, a shift that could lead to closer cooperation with the U.S. military.

Tokyo officials, normally wary of upsetting Beijing, are speaking openly about preparing for a crisis and supporting Taiwan, a self-ruled island claimed by China, despite Japan’s pacifist constitution.

Like the U.S., Japan doesn’t have formal diplomatic relations with Taiwan. But on Friday, lawmakers in Tokyo and Taipei held a rare meeting by videoconference to discuss ways to boost ties, including possible cooperation in maritime rescue.

Deputy Prime Minister Taro Aso said recently in a speech to supporters that Japan and the U.S. should plan together to defend the island in the event of hostilities.

In its annual regional security review, Japan said there a “greater sense of crisis than ever before” regarding Taiwan, after China stepped up maneuvers by its ships and aircraft nearby.

Major Japanese military drills starting in September are expected to further help Tokyo prepare for any trouble in areas including Taiwan, current and former Japanese officials say.

U.S. officials have long urged Japan to take a greater role in helping support operations in East Asia. While the U.S. supports Taiwan through weapons sales, it has left ambiguity about whether it would commit military forces to help defend the island, a stance intended to deter conflict.

Secretary of State Antony Blinken (center left) and Defense Secretary Lloyd Austin (left) after their joint press conference with Japan's Foreign Minister Toshimitsu Motegi and Defence Minister Nobuo Kishi in Tokyo in March.

Photo: kim kyung-hoon/Agence France-Presse/Getty Images

Any more support from Tokyo for Taiwan could change the calculus for Beijing if it ever considers an attack or invasion, military analysts say.

Cooperation between Washington and Tokyo has been limited by Japanese laws that restrict the country’s military to self-defense, and the Japanese public’s wariness over foreign entanglements.

There is no sign of an imminent clash over Taiwan, and some military strategists believe risks remain low. Beijing would face extreme international pressure if it moved to forcibly reunify with the island, and any invasion could disrupt supplies of Taiwanese semiconductors vital to China’s economy.

Still, tensions have risen. Chinese leader Xi Jinping in July renewed a commitment to complete reunification and “smash” any push for Taiwanese independence. Some American military leaders have warned that China may seek to take over Taiwan in the next few years, after China successfully imposed more control over Hong Kong.

Beijing has increased military drills near Taiwan, including live fire drills on Aug. 17, and called for the U.S. to sever military ties with the island.

Beijing’s state media have added to pressure on Taipei following the U.S. withdrawal from Afghanistan, by saying it showed the unreliability of alliances with America.

Taiwan’s foreign minister said Beijing’s goal of controlling the island showed it wanted to “emulate the Taliban.”

For Japan, even a small risk of armed conflict over Taiwan is a major concern. From the Japanese island of Yonaguni, the coast of Taiwan can be seen on a clear day just 70 miles away. Okinawa, the biggest island in Japan’s southern chain, is home to major U.S. military bases and most of the 50,000 American troops in Japan.

A military radar station on Yonaguni island.

Photo: ALASTAIR GALE/THE WALL STREET JOURNAL

As part of Japan’s coming military drills, thousands of troops will transport weapons and supplies to Japan’s south from September through November, the first such national exercise in almost 30 years, according to people familiar with the planning.

The mobilization of the military, known as the Self-Defense Forces, has been planned for over a year and isn’t a direct response to recent tension over Taiwan, Japanese military officials say.

However, Noboru Yamaguchi, a retired Japanese army general, said the exercises would help improve readiness for any clash over the island. Concern over Beijing’s intentions about Taiwan and a lack of coordination between Japan and the U.S. have given the issue urgency, current and former Japanese officials say.

“Like it or not, if a contingency takes place there, it leaves no alternative but to defend Japan,” said Lt. Gen. Yamaguchi, now a foreign relations professor at the International University of Japan.

In an interview, Vice Defense Minister Yasuhide Nakayama described tension in the Taiwan Strait as one of the most destabilizing threats to Japan.

“The Defense Ministry and the Self-Defense Forces are constantly considering various scenarios so that we can respond appropriately,” Mr. Nakayama said.

Taiwan has long been a U.S.-China flashpoint, but its tech and military capabilities have come into sharper focus under the Biden administration. WSJ travels to three places on the island to explain how both superpowers could determine Taiwan’s future. Photo: Wally Santana/AP The Wall Street Journal Interactive Edition

Despite support from Japanese leaders, Tokyo is unlikely to take a front-line role in any confrontation over the island. Japan’s constitution bars the use of military force to settle disputes, a legacy of World War II.

However, the proximity to Taiwan of Japan’s southern islands and the presence of U.S. military bases there means Tokyo will almost certainly be drawn into any conflict. Legal revisions in recent years mean Tokyo can use force to defend allies that are under attack close to Japan, and provide supplies.

“Over the next year or two, it will be necessary for Japanese and U.S. defense officials to review shared military roles and capabilities by taking a Taiwan contingency into consideration,” Masahisa Sato, the head of foreign relations in Japan’s ruling party and a participant in the Friday meeting with Taiwanese officials, said in an interview.

Support roles Japan could play if the U.S. military is involved in a Taiwan crisis include refueling American warships, sharing reconnaissance, defending U.S. bases and assisting with evacuation of refugees from Taiwan, said Katsutoshi Kawano, a former chief of the joint staff of the Self-Defense Forces. Two Japanese destroyers that are being converted to aircraft carriers could be used to refuel American F-35B jet fighters, he said.

U.S. military bases on Okinawa would be the nearest and largest launching points for any American intervention in support of Taiwan. They could become targets for Chinese missile attacks, defense analysts say, which would allow Japan to retaliate under the right of self-defense.

Japan plans to equip the military with cruise missiles that could be fired from jet fighters if Tokyo decides that it needs to retaliate against an attack, and is developing “standoff” ground-based missiles that can target ships from several hundred miles.

Yoji Koda, a retired SDF vice admiral, said that if the U.S. faced military setbacks against China in a clash over Taiwan, pressure could increase on Japan to take a more aggressive role.

“Until now, there had been the simple picture of the U.S. taking the offensive role and Japan engaging in Japan’s defense only, but that would no longer be the case,” he said.

For decades, Japan has avoided planning for a crisis involving Taiwan. China wasn’t seen as capable of forcing reunification with the island, which has been governed separately from the mainland since the Communist Party’s victory in China in 1949.

China now has the world’s second largest military after the U.S. Defense spending by Beijing has risen 76% over the last decade to $252 billion in 2020, according to the Stockholm International Peace Research Institute.

In April, President Biden and Prime Minister Yoshihide Suga issued a statement calling for peace and stability in the Taiwan Strait, the first joint reference to Taiwan by U.S. and Japanese leaders since 1969.

Asked about Taiwan in an interview in July, Mr. Suga said, “We must work to lift the deterrent power of the U.S.-Japan alliance.”

Randy Schriver, assistant secretary of defense for Indo-Pacific Security Affairs in the Trump administration, said Japan and the U.S. had discussed the implications of scenarios such as a Chinese blockade of Taiwan without going into detailed talks on responses.

“I think what really needs to happen on the military-to-military side is we begin the process of a bilateral plan,” he said.

Write to Alastair Gale at alastair.gale@wsj.com and Chieko Tsuneoka at chieko.Tsuneoka@dowjones.com