Unternehmen Elster (Operation Magpie in English) was a German espionage mission intended to gather intelligence on U.S. military and technology facilities during World War II. The mission commenced in September 1944 with two Nazi agents sailing from Kiel, Germany on the U-1230 and coming ashore in Maine on November 29, 1944. The agents were William Colepaugh, an American-born defector to Germany, and Erich Gimpel, an experienced German intelligence operative. They spent nearly a month living in New York City, expending large amounts of cash on entertainment, but accomplishing none of their mission goals.
Colepaugh quickly lost his commitment to espionage, and hoping to avoid the death penalty for treason, turned himself in to the FBI and betrayed his partner Gimpel, effectively ending the operation in late December 1944. In February 1945, the two agents were convicted of espionage by a military court and sentenced to death. At the time, the military tribunal which named American citizens in a conspiracy to commit treason was only the third of its kind ever held in the history of the US. When the war ended, their sentence was subsequently commuted to life imprisonment by President Harry S. Truman. Gimpel was paroled in 1955. Colepaugh was paroled in 1960.
Operation Magpie was one of only two times the Germans landed agents on American shores by submarine during the war. Despite a number of claims and speculations that the mission was intended to sabotage the Manhattan Project, no supportive evidence exists in the official investigative records.
The idea of landing spies in the United States originated with Nazi Germany's foreign minister, Joachim von Ribbentrop, and this particular operation was developed by the Schutzstaffel (SS). Operation Magpie would be Germany's second and final attempt to insert agents onto the American mainland by submarine. They had previously landed agents on American shores by U-Boat as part of Operation Pastorius in June of 1942, but that mission failed, resulting in the capture of all eight of the espionage agents who were deployed.