The 41-year-old man, who was not named, was in custody pending possible charges after a joint investigation with the F.B.I. and U.S. military intelligence.
The F.B.I. director, Kash Patel, said in a statement, “This F.B.I. has no tolerance for anyone who breaks their oath to the United States and whose actions endanger our national security and that of our partners.”