Britain was the first country to crack some of Japan's most important naval codes in the 1930s and 1940s, and the long-held view that the United States played the main role as Japanese code-breaker is false, according to a new book.

"The Emperor's Codes," written by Daily Telegraph defense correspondent Michael Smith and published last week, says Britain was responsible for breaking most of Japan's prewar naval codes. It says British code-breakers first cracked JN25, the Imperial navy's main code during World War II, months before the Americans, who took all the glory for breaking it.

Cracking JN25 helped to contribute to the destruction of the Japanese fleet at Midway in 1942.

Smith says Britain did not reveal the fact that it had cracked the Japanese codes because it wanted to continue intercepting the messages of other countries without being discovered.