Updated

A former civilian defense contractor working at the U.S. military's Pacific headquarters was sentenced to seven years and three months in prison on Wednesday for divulging military secrets to his Chinese girlfriend and keeping classified documents at his Honolulu home.

Benjamin Bishop demonstrated poor judgment and jeopardized national security because of an intimate relationship, said U.S. District Court Judge Leslie Kobayashi during his sentencing hearing. That Bishop would risk everything showed the girlfriend "has control over you," the judge told Bishop.

Bishop's move to contact the girlfriend from a halfway house he was allowed to stay at while awaiting trial, even though he was forbidden to do so, showed a continued lapse of judgment, she said.

"This makes the court question your ability to follow the law when it comes to this person," Kobayashi said.

Bishop, 60, will get credit for about a year he's already spent at the federal detention center in Honolulu since his arrest in March 2013. He faced up to 10 years in prison for each of two counts.

Defense attorney Birney Bervar argued Bishop should be sentenced to time served.

He said Bishop didn't intend to harm the United States and didn't gain financially from his actions. He said Bishop was only trying to help his graduate student girlfriend with her research.

Bishop worked in the field of cyber defense at the U.S. Pacific Command in Hawaii from May 2011 until his arrest. Before that, he helped develop Pacific Command strategy and policy. He retired from the U.S. Army Reserve as a lieutenant colonel a year ago.

Bervar said the girlfriend was a graduate student in the field of Bishop's expertise. He said they developed a friendship that became romantic. He has said the two were in love and the case was about love and not spying.

Authorities have not released the girlfriend's identity or whereabouts, or said publicly whether they believe she was working for the Chinese government. She was a Chinese national and living in the United States as a student, according to the FBI.