What they knew
US Navy cryptanalysts could read parts of Japanese naval messages. They saw a major operation coming against a target called "AF". The team at Station Hypo in Pearl Harbor, under Commander Joseph Rochefort, believed AF was Midway. Others in Washington thought it could be elsewhere.
The choice
To settle it, Midway was told to send an uncoded message reporting that its water distillation plant had broken down. Soon afterward Japanese traffic reported that AF was short of water.
Nimitz now had to decide whether to commit nearly every carrier he had, including the damaged Yorktown, on the strength of this intelligence. If the codebreakers were wrong, the Pacific Fleet could be caught out of position or destroyed.
The consequences
He committed. The carriers were waiting northeast of Midway when the Japanese struck, and the result was the Battle of Midway.