South African ex-Deputy President Jacob Zuma said he showered after sex with an HIV-positive woman, thinking this would reduce his risk of being infected.
This emerged as he was cross-questioned during his trial for rape. He denies rape but admits to consensual sex, and said he was ready to marry his accuser.
Remarks about HIV made by Mr Zuma in court earlier this week have angered Aids educators.
More than 5m South Africans have HIV - the highest number in the world.
Mr Zuma - previously seen as a possible future president - retains considerable popularity. His supporters see the charge as a political conspiracy.
Mr Zuma said in court on Wednesday he had left his bedroom after having sex with the woman and taken a shower because this "would minimise the risk of contracting the disease [HIV]".
He also said that he was prepared to marry the woman who accused him of rape, and that her aunts were discussing the possibility of marriage and a bride price as Zulu tradition dictates.
"Yes, if we had reached an agreement with that, I would have had my cows ready," Mr Zuma told the court, referring to "lobola": the traditional donation of animals by a husband to his bride's family.
Mr Zuma was being cross-examined by prosecutor Charin de Beer, after testifying in his defence on Monday and Tuesday.
Mr Zuma's testimony that he did not use a condom during the encounter, despite knowing the woman was HIV-positive, caused dismay among local Aids activists.
Statements like that can throw years of hard work down the drain
Vicci Tallis, Gender Aids Forum
Testimony sparks Aids fear
Before being sacked as deputy president last year, Mr Zuma headed the government's National Aids Council and the Moral Regeneration Campaign.
Mr Zuma said he normally uses condoms, but did not have one available on the night of the alleged rape.
Having unprotected sex is thought to be the main way in which Aids is spread in Africa.
Mr Zuma, 63, insisted that the woman, 31, who may not be named, had initiated the sexual encounter.
Last week, the defence failed in an application to have the rape charge dropped.
The case has attracted huge publicity and court sessions have drawn demonstrations by groups both for and against Mr Zuma.
Mr Zuma - a veteran of the ANC struggle to end apartheid and a favourite of the party's left wing - was once thought a likely successor to Thabo Mbeki as South African president.
But the allegations of rape and corruption are thought by many to have ended that prospect.
A separate corruption trial is scheduled to begin in the Durban High Court in July. Mr Zuma denies the corruption charge.