In a court filing that reads like an espionage novel, a defense contractor from Culver City with an affinity for Jason Bourne and James Bond has been charged with selling sensitive satellite secrets to an undercover FBI agent posing as a Russian spy, a federal indictment released Friday alleges.

Gregory Allen Justice, 49, who worked for an unidentified defense contractor as an engineer on military and commercial satellites since 2000, was arrested Thursday. According to a 72-page FBI affidavit, Justice told the undercover agent he could download secret files from his computer onto a “little flash drive” because he needed money to pay his housebound wife’s extensive medical bills.

“I’m so underwater with, with everything right now, that I don’t even know how far,” Justice told the agent at a meeting in a coffee shop Feb. 17.

Wife is ill

And while his wife might be legitimately sick, with medical and pharmacy bills totalling nearly $6,000 in two years, the affidavit alleges Justice used some of his proceeds from the undercover agent — and withdrew tens of thousands of dollars from his retirement accounts — to repeatedly send packages of money to a Long Beach woman.

He also sent water bottles filled with the sedative GHB in packages to a location in Compton, the affidavit alleges.

Justice, who told the agent he also loved the television show, “The Americans,” appeared to break bad after 12 years on the night shift, complaining he could not get promoted. He faced a judge Thursday in U.S. District Court in Los Angeles, where he was held on espionage charges that could send him to prison for up to 35 years.

“Mr. Justice allegedly placed his own interests of greed over our national security by providing information on sensitive U.S. technologies to a person whom he believed was a foreign agent,” Assistant U.S. Attorney General John Carlin said in a statement. “In the wrong hands, this information could be used to harm the United States and its allies.”

According to the FBI affidavit, Justice “provided technical data that he knew was both proprietary and controlled for export from the United States because of its military nature to a person he believed to be an agent of a Russian intelligence service.”

Took online spy courses

The alleged espionage may have begun as early as 2013, when, according to the FBI agent’s report, Justice’s bank account showed he paid more than $4,000 for online courses from 2013 to 2015 that included “Spy Escape and Evasion,” “Delta Defense,” and “Legally Concealed.”

Justice began a series of meetings in February with the “Russian,” who told Justice he was “very, very important” to his country. During their meetings, Justice — calling himself “Brian” — offered and provided digital copies of secret documents related to satellites. He received $500 to $1,000 at four of those meetings, which continued into April, the affidavit said.

“I can give you access to everything over time,” he told the undercover agent, the affidavit said. “Everything military is on the commercial servers.”

Examined computers

According to the affidavit, FBI investigators examined Justice’s work computers, his activities mailing packages at FedEx, reviewed websites he accessed, checked his bank statements and even bugged his car, listening to him in February rant to himself about his wife.

They also determined with the U.S. Air Force Office of Special Investigation that while some files Justice provided to the agent had no intelligence value, some could have been of interest to an adversary.

In unexplained evidence in the affidavit, the FBI agent outlined how Justice withdrew well over $100,000 from his retirement accounts, and repeatedly sent envelopes filled with hundreds of dollars in cash to a woman in Long Beach. He depicted her on his computer with a photograph of a European model, although that was not her, the affidavit said.

“Hey, so how much this week?” she text-messaged him in February, the document said.

Purchased gifts

In addition, he sent her gifts purchased on Amazon.com, including a Kingsford charcoal grill, kitchen furniture, a Dyson fan and a Vizio television.

In an interview, prosecutors would say only that the woman is not his wife.

And, in another odd aspect of the affidavit, Justice told the undercover agent in April that his wife had been given a prescription for a muscle relaxer called Anectine, which he said helped her breathe. The pharmacy, he said, would not fill it, so he asked the agent if he could obtain it for him. Anectine is a muscle relaxant or anesthetic administered by doctors.

The agent, who reviewed websites that Justice accessed, found he had read an article that explained how the drug had been used in a homicide and why it was an effective poison, the affidavit said.