Marius Sophus Lie, the great Norwegian mathematician, was in Paris in 1870 when war broke out between France and Prussia. He decided to go to Italy, but:
He did not get far; the French authorities caught him at Fontainebleau, about 25 miles southeast of Paris, carrying a number of documents covered in incomprehensible symbols. Since these were evidently in code, Lie was obviously spying for the Germans, and he was placed under arrest.
from Why Beauty is Truth: A History of Symmetry, by Ian Stewart.
Ultimately a prominent French mathematician vouched for him and Lie was released a month later.