LONDON — Julian Assange, the WikiLeaks founder, offered his most detailed and public account on Wednesday of events that led to a rape accusation against him in Sweden, saying he was innocent and had engaged in “consensual and enjoyable sex” with the accuser.

Last month, questions prepared by Swedish prosecutors were posed to Mr. Assange at the Ecuadorean Embassy, where he has lived since 2012 to avoid extradition to Sweden over the rape accusation. The questions were asked by an Ecuadorean prosecutor under an agreement made by the two countries in August.

But in a move that is likely to irk Swedish prosecutors, whom Mr. Assange has denounced for forcing him to remain confined in the embassy for the past six years, the WikiLeaks founder on Wednesday released the answers he gave during the interview. In the 19-page statement, which reads alternately like a legal defense brief and an emotional airing of personal grievances, he writes that he is “entirely innocent” and had engaged in “consensual and enjoyable” sex with the woman who accused him of rape.

Karin Rosander, a spokeswoman for the Swedish Prosecution Authority, said Wednesday that the authority was still waiting for a written report on Mr. Assange’s questioning from the Ecuadorean prosecutor.