Fred William Johansen, 93, who worked as a cryptologist with the National Security Agency and whose passion was performing magic tricks, died of a cerebral hemorrhage Aug. 10 at Frederick Memorial Hospital. A longtime Montgomery County resident, he and his wife moved to Jefferson in 2002.

Mr. Johansen was born in Hay Springs, Neb. Growing up in the small town in the western part of the state, Mr. Johansen attended the Congregational church that his grandfather helped build, and in the summertime he played his trombone at weekly band concerts on the old village square. He also worked at Charlie Riley's grocery store and, at 13, began working as an usher at a theater called Skeen's Wonder Show.

Occasionally, a traveling magic show passed through Hay Springs, and Mr. Johansen's father, editor of the weekly Hay Springs Enterprise, usually got a free pass. His stories about the wonders he witnessed prompted young Fred and his twin brother Ferd to put together a magic act. The Twin Mystics, as they billed themselves, entertained at schools and other Hay Springs venues, as well as across the state.

Mr. Johansen graduated from Hay Springs High School in 1930 and with the Depression at full force moved to Omaha to find work. He attended the Bickel School of Advertising and a business school. While working for a large furniture store in Omaha, he performed as a professional magician for trade shows, dinners and churches and in theaters.

Shortly after the Japanese attack on Pearl Harbor in 1941, Mr. Johansen joined the Navy. He was dispatched to Washington, where he worked with communications specialists in the Navy Department, and in 1943 he was sent to Chunking, China, where he was assigned to the headquarters of Adm. Milton Miles. As a magician, he traveled across China and into Mongolia, performing at Chinese army camps, in temples and in the homes of warlords.

When the war ended, he settled in the Mount Pleasant area of Washington. With his wife and four children, he moved to Montgomery County in 1955.

In Washington, Mr. Johansen went to work for the CIA and was transferred to the NSA shortly thereafter. His duties as a cryptologist were highly classified, but when he retired in 1973, he was commended for his dedication to the U.S. government and for his support of NSA's mission.

He continued entertaining with his magic tricks and ventriloquism. His daughter Bunny Galladora recalled a favorite joke: Little Joe, the dummy, would get "sassy," and Mr. Johansen would say, "If I were your father, I'd give you poison." And Little Joe would say, "If I were your son, I'd take it."

A quiet man, he became a different person on stage, his wife, Madge E. Johansen of Jefferson, recalled. He performed at children's birthday parties and churches and at Christmas for reporters and their families at the National Press Club. He did his magic act for patients at the National Institutes of Health until he was no longer able to do so.

Mr. Johansen was a member of the Society of American Magicians for 74 years and served several terms as president.

In addition to his wife of 57 years, survivors include four children, Hazel Johansen, a missionary in Taiwan, Darlene Pierce of Laurel and Bunny Galladora and Fred "Skip" Johansen, both of Gaithersburg; four sisters; a brother; six grandchildren; and a great-grandson.