Under the security alliance with the United States, Japan has served as a bulwark against an expansion of the Soviet communist bloc and China's hegemonic ambitions since the end of World War II.

In August 1945, Japan surrendered in the war following heavy casualties, including from U.S. air raids across the country and the U.S. atomic bombings of the Japanese cities of Hiroshima and Nagasaki.

The Allied powers considered dividing Japan. But the United States, wary of the potential rise of the Soviet Union, wanted Japan to recover quickly as a capitalist country. Washington used Japan as a base for containing communism during the Cold War.

Japan signed the San Francisco peace treaty and the former security treaty with the United States in September 1951.

Then-U.S. Secretary of State John Dulles at the time said that this granted the United States the right to station as many troops as it wanted in Japan indefinitely.

Then-Japanese Prime Minister Shigeru Yoshida entrusted military affairs to the United States to focus on postwar reconstruction, a strategy that guided Japan for decades and facilitated rapid economic growth.

The revision of the security treaty in 1960, which outlined U.S. defense obligations to Japan, faced significant opposition. Then-Prime Minister Nobusuke Kishi rammed it through parliament amid protests from around 300,000 people who gathered near the parliament building.

After Japan emerged as an economic power in the 1970s, the United States pressured the country over trade in textiles, beef and automobiles.

Then, in the 1990s, following the end of the Cold War, the United States urged Japan to play a greater role in the international community.

During the Gulf War in 1991, Japan provided $13 billion in support for U.S.-led multinational forces. The approach came under fire, however, for contributing only money, not personnel.

After the September 2001 terrorist attacks on the United States, Washington demanded Tokyo send troops for the wars in Afghanistan and Iraq. Then-Japanese Prime Minister Junichiro Koizumi dispatched Self-Defense Forces personnel for refueling support operations in the Indian Ocean and humanitarian and reconstruction support in Iraq.

During the years when the now-defunct Democratic Party of Japan was in government, tensions with the United States arose over the relocation of the U.S. Marine Corps' Futenma air station in Okinawa Prefecture.

In 2013, after the Liberal Democratic Party returned to power, then-Prime Minister Shinzo Abe pledged Japan's commitment to maintaining the international order.

Japan enacted security legislation in 2015 to enable the country to exercise its right to collective self-defense. In 2022, then-Prime Minister Fumio Kishida said Japan would possess counterattack capabilities.

Trump revived his "America First" policy when he returned to the White House this year.

"Even if the United States changes, we can't rely on others for nuclear deterrence," a senior Japanese Defense Ministry official said, emphasizing the need for the Japan-U.S. alliance.

Still, prospects for relations with an inward-looking United States are increasingly uncertain.

"The Trump administration focuses on realism," Isao Miyaoka, a professor of international politics at Keio University in Tokyo.

The Japan-U.S. alliance has promoted defense and economic cooperation, but its scope will narrow to focus on military aspects for the time being, Miyaoka said, pointing to the increasing need for Japan to enhance collaboration with like-minded nations.

"This means that Japan may find it easier to assert its uniqueness," he added.