TOKYO — Japan ended decades of denials on Tuesday by confirming the existence of secret cold war-era agreements with Washington that, among other things, had allowed American nuclear-armed warships to sail into Japanese ports in violation of Japan’s non-nuclear policies.

The existence of the pacts, known in Japan as the “secret treaties,” has long been known from declassified documents in the United States and the testimony of former American and Japanese diplomats. But successive prime ministers denied their existence, turning the agreements into a symbol for many Japanese of how Liberal Democratic governments had turned their country into a stunted democracy run without full consent by the public.

After ending the Liberal Democrats’ nearly unbroken 54-year grip on power last summer, the new Democratic Party government opened an investigation into the pacts as part of their promised housecleaning of Japan’s postwar order. Exposing the truth about their nation’s secret dealings with the United States was also part of Prime Minister Yukio Hatoyama’s pledges to put Tokyo on a more equal footing with Washington.

This fed concerns among some in Washington, particularly conservatives, that revealing the treaties was part of an effort by Mr. Hatoyama’s administration to push away from the United States.