In May 1942, U.S. and Australian naval and air forces were facing off against the Imperial Japanese Navy in the Battle of the Coral Sea in the South Pacific. But in a windowless basement at Pearl Harbor, a group of U.S. Navy codebreakers had intercepted Japanese radio messages suggesting Japan was planning an entirely different—and potentially far more damaging—operation in the Pacific theater.

Led by Lieutenant Commander Joseph Rochefort, the team of cryptanalysts and linguists made up the U.S. Navy’s Combat Intelligence Unit (better known as Station Hypo). By April 1942, they had gotten so good at breaking Japan’s main operational code, which they dubbed JN-25b, that they were able to intercept, decrypt and translate parts of Japan’s radio messages within hours of when they were sent.

'AF' Identified as Code for Midway

The radio traffic they intercepted that May suggested that Admiral Isoroku Yamamoto, the mastermind behind the Pearl Harbor attack, was preparing a major invasion, involving four Japanese aircraft carriers along with many other ships, at a location designated with the initials “AF.”

Station Hypo had little doubt as to what “AF” referred to: the U.S. naval and air base on Midway Atoll, two tiny islands located in the central Pacific, around 1,200 miles northwest of Pearl Harbor. Back in March, a Japanese plane reporting weather conditions near the islands had also mentioned “AF,” suggesting strongly that the designator referred to Midway.

But not everyone was convinced the codebreakers were right.

“Rochefort’s job was to gather information, raw data for the most part, and send [it] to Washington,” says Craig Symonds, professor of maritime history at the Naval War College and author of The Battle of Midway. Officially, Rochefort reported to Captain John R. Redman, director of OP-20-G, the Navy’s Code and Signals Section. 

Redman’s department would then put together that data with intelligence acquired from other locations and send it all out to the operational commanders, including Admiral Chester W. Nimitz, commander in chief of the U.S. Pacific Fleet at Pearl Harbor.

In practice, however, Rochefort chose to bypass this chain of command and communicate Station Hypo’s findings directly to Nimitz’s intelligence officer, Lieutenant Commander Edwin T. Layton. Layton and Rochefort were friends and had spent three years together in Japan earlier in their careers, studying the language and culture.

This side channel “worked great within the theater, but you can see how folks in Washington would say [that] Rochefort is short-circuiting the system,” Symonds says. “That's not the way this is supposed to work.”

Codebreakers Set a Trap to Confirm Japanese Attack

Rather than accept Midway as the target, Redman and others in Washington suspected the Japanese might be preparing another attack in the South Pacific, against Port Moseby, New Caledonia or Fiji, or even an attack on Hawaii or the U.S. West Coast.

Determined to dispel such doubts, Rochefort’s team famously devised a ruse. Via submarine, they sent a message to the base on Midway instructing personnel there to radio Pearl Harbor that the salt-water evaporators on the base had broken down. Two days later, a Japanese message was intercepted that reported “AF” was running out of fresh drinking water.

“That's not how we found out Midway was the target, [though] it’s often interpreted that way,” Symonds clarifies. “We knew...or Rochefort knew, anyway. Rochefort did it to help convince Washington that he knew what he was talking about.”

By the end of May, Navy cryptanalysts had figured out more details about Yamamoto’s plans, including almost the entire order of battle of the Imperial Navy. With this information, Nimitz was able to plot a strategy that would take the Japanese by surprise, assembling three U.S. aircraft carriers at a spot some 300 miles north of Midway, which they called “Point Luck.” This included the USS Yorktown, which had sustained serious damage during the Battle of the Coral Sea but was repaired in just two days in the Pearl Harbor Navy Yard.

US Victory at Battle of Midway Marks Turning Point in WWII

Code-breaking alone doesn’t explain the stunning Allied victory in the Battle of Midway (June 4-7, 1942), according to Symonds. But, he says, it does explain why “American decision-makers, and particularly Chester Nimitz, knew enough to take what at the time seemed to many to be a risky move—committing all three of his existing aircraft carriers, including the Yorktown, which was pretty beat up from the Battle of the Coral Sea, and sending them up north of Midway in an ambush position.”

The Pacific War would continue for another three years, costing many more lives on both sides, but the Allied victory in the Battle of Midway marked a crucial turning point. Before the battle, Japan had proved virtually unstoppable in the Pacific. At Midway, the Imperial Navy lost all four aircraft carriers involved in the assault, as well as more than 300 aircraft and as many as 3,000 men, including some of their most experienced pilots. A month later, the Allies would launch their first major offensive at Guadalcanal, taking the initiative in the Pacific War for the first time.

“Up until June 4, 1942, all conflict was initiated by the Japanese,” Symonds says. “The Japanese were essentially making the decisions about where battles would be fought and initiating them. After June 4, the Japanese really did not initiate any new offensives at all, and the Americans did.”

HISTORY Vault: World War II

Stream World War II series and specials commercial-free in HISTORY Vault.