An engineer in Southern California was sentenced on Monday to five years in prison after he sold military secrets to an undercover FBI agent who he believed was a Russian spy.

U.S. District Judge George H. Wu handed out the punishment Monday morning to Gregory Allen Justice, who worked as a satellite engineer for a defense contractor, the Department of Justice said. While the company Justice worked for was not included in court filings, Boeing told CNBC it had a former employee by the same name.

The engineer pleaded guilty in May to two charges: economic espionage, and violating the Arms Export Control Act and the International Traffic in Arms Regulations.

During a meeting with the undercover FBI agent, Justice discussed developing a relationship like the one portrayed on the TV show The Americans, according to the Department of Justice. He also offered to take the agent to his employer’s production facility so the agent could photograph the facility.

Justice worked on commercial and military satellites that were sold to the Air Force, Navy and NASA, according to the Los Angeles Times.

When imposing the sentence, Wu called the crimes “extremely troublesome” and added that it is widely known Russia “is not friendly to this country.”

During the time Justice was meeting with the FBI agent who he believed to be a Russian spy, he received $3,500 in cash, according to the Justice Department. Prosecutors said Justice sent most of that money to a woman he was involved with online but had never met in person.

“Unlike a reality television series, selling secrets to a foreign government is not entertaining, but in the wrong hands, threatens national security and puts American lives at risk,” Danny Kennedy, the Acting Assistant Director in charge of the FBI’s Los Angeles field office, said in a statement.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Abigail Abrams at abigail.abrams@time.com.