An HIV-positive Navy chaplain was sentenced to two years in prison Thursday after admitting he had sex with an Air Force officer without disclosing he had the virus and that he forced himself on a Naval Academy midshipman.

Lt. Cmdr. John Thomas Lee, 42, of Burke, Va., pleaded guilty to forcible sodomy with the midshipman, aggravated assault on the officer and other crimes after reaching a plea agreement with prosecutors at a court-martial at Quantico Marine Corps Base, south of Washington.

Marine spokesman Maj. Tim Keefe said after Thursday's hearing that nobody is known to have contracted HIV from Lee.

Lee, a Catholic priest, was assigned to the academy from 2003 to 2006 and later to Quantico. He was relieved of his duties in June.

The forcible sodomy occurred in the fall of 2004, when the midshipman was in his junior year. The midshipman, who was not identified, had previously received counseling from Lee, and said he allowed Lee to perform oral sex on him because he was intimidated by Lee's status as a chaplain.

"This was a priest. This was a guy who knew all of my darkest secrets," the victim, now a Navy ensign, testified during the trial's sentencing phase.

Lee, who learned that he has the virus that causes AIDS in 2005, admitted he had sex the following year with an Air Force lieutenant colonel at the colonel's home in Fairfax. Lee said he met the man on the Internet and lied when directly questioned about his HIV status.

"I said everything was OK," Lee told the judge.

Because the sexual contact with the officer included a risk of grave physical danger or death due to Lee's HIV status, it is considered an aggravated assault under military law.

Lee also pleaded guilty to violating a lawful order, committing an indecent act, fraternization, conduct unbecoming an officer and consensual sodomy.

Navy authorities launched an investigation earlier this year after receiving a complaint from a Marine corporal at Quantico. The corporal, who has since left the Marines, testified that he sought counseling from the chaplain, who quickly steered conversations to sex acts and eventually persuaded the corporal to take pornographic pictures of Lee.

Lee looked straight ahead and avoided eye contact with the witnesses during their testimony. "I'd like to apologize for all the harm I have done," he said before he was sentenced.

Lee was ordained as a priest in 1993 and began serving as a military chaplain in 1996. His faculties to function as a priest were revoked in June, after an accuser came forward, said Julia Rota, a spokeswoman for the Archdiocese of the Military Services, which oversees Catholic priests in the military.

Under the consensual sodomy charge, Lee admitted a long-term sexual relationship with a Navy ensign who lived with him for the last year in his Burke home.

Navy spokeswoman Lt. Candice Tresch said it would be up to the ensign's local command authorities to decide whether to pursue consensual sodomy charges against the ensign. Air Force spokesman Capt. Tom Wenz said he could not speculate on whether the Air Force colonel might face charges.

The plea agreement limits Lee's time in the brig to two years provided he complies with all conditions of the deal. One condition is a requirement that he inform medical authorities within the next 30 days of all his sexual contacts since learning his HIV-positive status.