CHINA UNITED its neighbors last month when it unilaterally declared an air-defense zone in the East China Sea , covering territory claimed by Japan and South Korea. The act prompted a symbolic show of force by the United States, which dispatched B-52s through the new zone without notice to Beijing. It also set the stage for closer security cooperation between Japan and the United States — and potentially, an improvement in strained relations between Tokyo and Seoul.

Japanese Prime Minister Shinzo Abe took an important and needed step toward that stronger military alliance this week by engineering the approval of a new base for U.S. forces in Okinawa, a long-standing irritant in bilateral relations. But he also complicated the prospects for an effective regional response to China’s belligerence and unnecessarily exacerbated a tense atmosphere in the region by paying the first visit by a Japanese prime minister in seven years to the Yasukuni memorial in Tokyo, where, among others, war criminals from World War II are enshrined. It was a provocative act that is likely to further weaken Mr. Abe’s international standing and Japan’s security.

Yasukuni is meant to commemorate Japan’s millions of war dead, not just the leaders later convicted of war crimes, and it’s inconceivable that a U.S. president would heed demands by former U.S. enemies for a boycott of Arlington National Cemetery. But the Tokyo memorial has taken on special significance for China, South Korea and other victims of Japanese aggression because of the reluctance of postwar leaders to accept full responsibility for that aggression as well as for crimes, including the enslavement of foreign “comfort women.”

Mr. Abe is particularly notorious for his revisionist take on history, which is often linked to his practical goals of increasing defense spending and revising Japan’s postwar constitution to loosen the strict controls on its armed forces.

Given the behavior of China and North Korea, Mr. Abe has good reason to pursue some of these reforms and to seek closer defense cooperation with the United States. But when he appears to link his policies to nostalgia for Japan’s prewar empire, as he did this week, he undermines his own cause. As the prime minister surely foresaw, the Yasukuni visit provoked outrage in China and South Korea, and it will be milked by nationalists in both countries. China will use it to deflect negative reaction to its defense-zone declaration, while South Korean President Park Geun-hye will be reinforced in her refusal to meet Mr. Abe or take measures to improve relations.

For its part, the Obama administration, despite its pleasure over the Okinawa base development, rightly felt compelled to publicly criticize Mr. Abe. A statement issued by the U.S. Embassy in Tokyo said, “The United States is disappointed that Japan’s leadership has taken an action that will exacerbate tensions with Japan’s neighbors.” Some in Tokyo speculate that Mr. Abe has an interest in those tensions, because they could help him persuade skeptical Japanese to support his military and constitutional reforms. But the prime minister risks isolating his government in the region and making cooperation with the United States more difficult. Japan can ill afford either development.