A HIV-infected man initially told a gay couple he was HIV negative but later boasted he wanted to give the disease to married men, a court has heard.

A HIV-infected man accused of deliberately transmitting the virus told police he was unaware he was required to tell sex partners about his condition.

Rhys Edwin Martin, 22, is on trial accused of infecting a 59-year-old Brisbane man with the disease in 2012.

The Brisbane District Court heard the former sex worker learnt he had HIV in early 2011.

About 18 months later, he met his alleged victim and the man’s male partner for a “random hook-up” after meeting them on gay website Manhunt, the court heard on Tuesday.

Martin told police he stayed with the couple in their north Brisbane unit and had unprotected sex with them several times over three months.

Prosecutors say Martin initially told the couple he was HIV negative and had a preference for unprotected sex, but later boasted he wanted to give the disease to married men.

Martin told police he was “scared” to reveal his state because he did not want to return to his former living arrangement.

“If I had’ve told them they wouldn’t have kept me around, and I would’ve been stuck out in Goodna (west of Brisbane) in a garage,” he told detectives in an interview played to the jury.

Martin also told police he did not reveal his condition to up to four other sex partners.

“Are you aware … that you’re obliged to advise sexual partners of your state?” a detective asked during the interview.

“I am now,” Martin replied, adding he had become aware only one to two months earlier.

The court heard the alleged victim eventually became suspicious of Martin, who had sores on his arms, and the couple took him to get a blood test, which came back positive for HIV.

A doctor testified the 59-year-old tested positive for HIV a month later and the virus had been transmitted in the previous year.

Martin has pleaded not guilty to committing a malicious act with intent.

The trial continues.