The case of the Navy engineer's alleged double life seems as though it was ripped from the pages of a spy novel.

An Iranian-American engineer, naturalized in 1985, gets a job with the Navy and holds a secret clearance. All the while he’s allegedly maintaining a sophisticated web of intermingled identities to shuffle money from foreign bank accounts, hold addresses in at least four states and lie about his Iranian passport. And elements of that scheme evaded detection for 30 years .

James Robert Baker is alleged to have lied to the Navy about his continuing ties to Iran during his entire career, which started in 1985 at the Naval Surface Warfare Center and was suspended last summer when U.S. Marshalls raided his small Springfield, Va., home. He was indicted on fraud charges in early February.

Security experts said they were troubled by authorities' repeated failure to thoroughly investigate Baker, especially after red flags like his return to Iran only days after Navy officials told him to prove that he had turned it in. Facts about what motivated Baker's alleged three-decade ruse remain unclear, but several experts who reviewed the case said it bore hallmarks of espionage.

"When you look at an individual in place for that many years under an assumed identity, it reeks of a foreign counter-intelligence operation," said Fred Burton, a former State Department counter-terrorism agent and analyst for intelligence firm Stratfor. "It rings almost every alarm bell you'd look for. It's an almost textbook espionage case."

Baker's employer, Naval Sea Systems Command, and the office of the U.S. Attorney for the Eastern District of Virginia, which filed the Feb. 4 indictment, declined to comment on the case. Baker's attorney, Tom Walsh of Petrovich & Walsh P.L.C., did not return repeated emails and phone messages seeking comment.

Baker's secret clearance gave him access to less sensitive information than that available to Chelsea Manning, the former Army intelligence analyst with top-secret access convicted for leaking reams of classified information to Wikileaks. But the fact that Baker was in the job for three decades opens the Navy to enormous damage if he was spying, Burton said.

"It's not just the information he had access to," Burton said. "It's things he heard on work trips, around the water cooler, at lunch with co-workers: Human intelligence. We know those things aren't supposed to go on but we all know they do."

× Fear of missing out? Sign up for the Navy Times Daily News Roundup to receive the top Navy stories every afternoon. Thanks for signing up. By giving us your email, you are opting in to the Navy Times Daily News Roundup.

Two facts jump out as classic spy moves, Burton said. The first is Baker’s sophisticated routing of $133,902 from foreign bank accounts to accounts set up under his four separate identities to conceal it. The other is his use of safe deposit boxes and post office boxes in no fewer than four states. Both are classic examples of spy fieldcraft, he said.

"Those boxes — located a long way from his place of residence — are places a spy could use for clandestine communications with handlers," Burton said.

Experts were also in agreement that Baker, also known as Majid Karimi, should never have been granted a security clearance.

One security law expert said it was strange that the Navy reinstated Baker's clearance even after learning that Baker had kept a Iranian passport that he used to travel to Iran.

"I don't understand how that wasn't picked up as a red flag," said Greg Rinckey, a partner with firm Tully Rinckey who works on security clearance cases. "This is exactly what you are concerned about when you are looking at security clearance adjudication: Foreign passports, foreign bank accounts that a foreign government could transfer money into. Why this didn't happen is very concerning."

Chris Graham, an attorney at the Federal Practice Group who has worked as an administrative judge at the Defense Office of Hearings and Appeals on clearance cases, agreed that the signs were missed.

"Whoever was doing the security clearance investigations was asleep at the switch," Graham said.

Investigators, he said, have access to databases that with a name and a Social Security number could have busted the fraud years ago. Baker, who had a secret clearance for more than 30 years except for a one-year suspension in 2001 after his Iran trip, would have been investigated at least four times because secret clearances are re-investigated every 10 years.

"Here's a guy who legally changed his name in 1985," Graham said. "Seems to me you run his old name to see if it's still being used. Nobody was doing anything here but a cursory investigation."

This is not the first time in recent history the clearance system has come under fire. In 2014, the Office of Personnel Management severed ties with U.S. Investigations Services Inc., a company that was performing a large portion of the government clearance investigation, after the Justice Department alleged they circumvented reviews of their background checks for four years to increase profit margins.

USIS conducted the investigations on both NSA contractor Edward Snowden and Navy Yard shooter Aaron Alexis, both of whom had red flags in their past that experts said ought to have come up in the clearance process. Last summer USIS agreed to pay a $30 million settlement to the government.

Today, OPM conducts many investigations with federal investigators in-house, and outsources others to contractors KeyPoint Government Solutions and CACI.

For some experts, however, the changes don't go far enough.

"The Defense Department needs to bring the entire process back in-house," said Burton, the former counter-terror agent. "The Secret Service does all their background checks in-house and they do that because their standards are really high.

"Now they probably won't do that because it's expensive. And some might say, 'Well this Baker guy is an anomaly, a one off, and there is no reason to change the whole process for one guy.' But the response to that is: How many potential cases like him are out there that you have no idea [of]?"