When New York Gov. Thomas E. Dewey discovered that the United States had broken the Japanese diplomatic codes and might have had prior knowledge of the 1941 sneak attack at Pearl Harbor, he was contacted secretly by Army Chief of Staff Gen. George C. Marshall.

Marshall asked Dewey not to reveal the secret during the 1944 presidential election campaign between Dewey, the Republican candidate, and President Franklin Delano Roosevelt, because the Japanese were still using the same codes at the height of the Pacific war.

Marshall sent an Army intelligence officer in civilian clothes to meet secretly with Dewey three times and spoke by telephone once with Dewey to persuade him that the war effort would be seriously endangered if Dewey disclosed U.S. knowledge of the codes.

While Dewey never revealed the secret, he remained convinced that Roosevelt had prior knowledge of the Pearl Harbor attack, after which the United States entered World War II, and that Roosevelt had ordered Marshall to get Dewey to keep his mouth shut during the campaign.

"Marshall does not do things like that," Dewey told Col. Carter W. Clarke at a meeting convened in a Tulsa, Okla., hotel room during a Dewey campaign trip. "I am confident that Franklin Roosevelt is behind the whole thing."

In documents just declassified by the National Security Agency and turned over to the National Archives, an extraordinary series of meetings with Dewey is described by Clarke, who eventually became a brigadier general.

Clarke was acting as Marshall's go-between in an attempt to keep secret the fact that the United States was winning the Pacific war partly because it was reading Japanese diplomatic cables that gave the whereabouts of the Japanese fleet in detail.

In a letter written by Marshall and carried in secret to Gov. Dewey by Clarke, Marshall told Dewey that the United States won the battles of Midway and the Coral Sea because it had deciphered the Japanese codes.

Marshall also told Dewey that Japan was losing so many ships in the Pacific because "we know the sailing dates and routes of their convoys and can notify our submarines to lie in wait at the proper points."

Marshall pleaded with Dewey not to reveal the decoding secret, codenamed "Magic" by the Army Signal Intelligence Service, which had cracked the codes early in 1941.

"You will understand the utterly tragic consequences if the present political debates regarding Pearl Harbor disclose to the enemy any suspicion of the vital sources of information we possess," Marshall said to Dewey. "The conduct of all operations in the Pacific are closely related in conception and timing to the information we secretly obtain through these intercepted codes."

According to Clarke, Dewey balked at keeping silent about the code-breaking and insisted that Roosevelt must have known about the Japanese plan to attack Pearl Harbor and that Marshall was simply trying to cover up the fact that Roosevelt knew of the impending attack.

"He Roosevelt knew what was happening before Pearl Harbor," Dewey told Clarke at the first of their three meetings. "Instead of being reelected, he ought to be impeached."

Clarke said he met a second time with Dewey in the governor's office in Albany, N.Y., where Dewey was waiting for Clarke with Elliott V. Bell, then New York's superintendent of banks and one of Dewey's campaign managers.

Clarke told Dewey that he wanted to see him alone and that he had a second letter from Marshall that he had to take back to Marshall after Dewey had read it.

"Gov. Dewey said he could not see me or anyone else alone, that he would not read a letter he could not keep and which he could not show to or discuss with Mr. Bell," Clarke said. "He said he could not afford to read a letter he could not keep as he might later be charged with reading a letter different from the one he had really read."

Clarke said Dewey then turned to him and asked if he were "curious" about whether their secret conversation was being recorded.

"No, governor, I am not curious," Clarke said he responded to Dewey. "I merely assume that you have a recording device in the room."

"Well, I haven't, and I did not ever have one when I was district attorney," Dewey replied. "I had one in my witness room, of course, but never in my own private office."

Still balking at Marshall's plea about the code-breaking, Dewey demanded to know why Marshall wanted him to be silent about a secret that Dewey said was known to "at least 12 senators" in Washington.

"You know, colonel," Dewey said to Clarke, "this code business is the worst-kept secret in Washington. I'll be damned if I believe that the Japs are still using those two codes."

Clarke said Dewey telephoned Marshall, who agreed that Dewey could let Bell see the letter and that Dewey could keep the letter. Dewey and Bell then left Dewey's office for 22 minutes to discuss the matter.

On returning, Dewey said he had no questions about the letter and did not care to discuss the matter again. Clarke asked Dewey if he had any message for Marshall. "No," Dewey said. "No message." That apparently ended the affair, and Dewey never revealed the secret of the broken codes.

In a separate document made public by the NSA, William F. Friedman, head cryptographer for the Army in World War II, said the Army never knew how Dewey found out about the breaking of the Japanese codes or who in the federal government might have told him one of the war's best-kept secrets.

Friedman also insisted that the diplomatic cables contained nothing that hinted at the attack on Pearl Harbor because the Japanese military command had never told the Japanese Foreign Office about plans for the attack.

"The premier of the country and his minister of war were not notified of the impending attack on Pearl Harbor by their own high command," Friedman said. "At the time of the attack, the only codes we had broken were the diplomatic codes, which did not have anything in them about the attack."