RAF Regiment Squadron Leader Nicholas Tucker, 46, who is based at RAF Honington, Suffolk, told a jury at Norwich Crown Court that he had had sex "infrequently" between 1991 and 1995 because of the problem.
Tucker denies murdering his wife Carol, 52, at Lackford, Suffolk, on 21 July 1995. Prosecutors say he was infatuated with Dijana Dudukovic - a Serbian interpreter he had met while serving in the former Yugoslavia in the first half of 1995.
Yesterday, Tucker who served as a nuclear, biological and chemical weapons expert during the Gulf conflict in 1990, said his attempts to have sex with Dudukovic had been "a bit of a disaster".
Yesterday he faced questioning from David Stokes QC, prosecuting. He told Mr Stokes that although he had known Miss Dudukovic since January 1991, their relationship had been nothing special. He said it had only become sexual when he took Miss Dudukovic back to London for a week about a month before his wife's death.
Mr Stokes asked Tucker about a visit he had made to a venereal disease clinic shortly after he returned home on 15 July 1995.
The doctor he saw told the court how Tucker explained that he had last had sex with his Serbian girlfriend two weeks before and had not had sex before that for two years.
Under cross-examination Tucker said his last sexual contact with Miss Dudukovic had been about three weeks before his visit to the clinic.
And he said he had not had sex before that for a longer period than the two years noted by the doctor.
"It is actually more than that [two years]," said Tucker.
"When I came back from the Gulf I was impotent. In fact, it had been longer than that.
"Sex had been infrequent since early 1991."
Tucker told the court that he had not expected to see Miss Dudukovic again after leaving Bosnia in mid-July.
But the court heard that he had contacted her by phone two days after returning to England, on the morning of the day his wife died, and again on the day after his wife died.
He had continued to contact her by phone for many months after that, the court had heard.
The case continues.Reuse content