Three years into his voluntary captivity at the Ecuadorean embassy in London, WikiLeaks founder Julian Assange will finally get his say in court, or at least in an embassy office.

Ecuador and Swedish authorities have reached a bilateral agreement for a Swedish prosecutor to travel to the UK to question Assange at the embassy in connection with a sex-crimes investigation against him in Sweden.

Assange has been wanted for questioning in Sweden since 2010 after sexual encounters with two women in that country led to a criminal investigation of rape. Assange has not actually been charged with any crime, but he is wanted for questioning. He has denied the allegations, stating that his relations with the women were consensual.

In addition to the rape allegation, Assange had initially also been wanted for questioning in relation to sexual molestation charges, stemming from an encounter with one of the women. But the statute of limitations has since run out on that alleged crime, so only the rape allegation and investigation remains active.

One of the women, referred to in court as "Miss A.", told police that their encounter was consensual but that it became violent when Assange pinned her to the bed as she attempted to reach for a condom. He then allegedly released her and agreed to wear the condom, but did something that caused it to rip, and continued to have sex.

The second woman, referred to as Miss W., also initially had consensual relations with Assange using a condom. But later, as they shared a bed, Assange allegedly began having sex with her while she was asleep, which is the primary basis of the rape allegations against him. According to the woman's police statement, she woke up during the encounter concerned that he wasn't wearing protection after she had told him repeatedly the night before that she would not have unprotected sex. "Are you wearing anything?" she asked him, according to the report.

“You,” Assange replied.

The police report indicates that the woman "felt it was too late" to halt the unprotected sex at that point. "He [Assange] was already inside her and she let him continue. She couldn’t be bothered to tell him again. She had nagged about condoms all night. She had never had unprotected sex before."

Following the incidents, the two women met up and went to police, after failing to persuade Assange to take an HIV test.

Swedish authorities allowed Assange to leave the country, despite the investigation and only later issued a warrant for his arrest.

Assange fled to the Ecuadorean embassy after losing a protracted legal battle to avoid extradition to Sweden for questioning. Assange and his attorneys have asserted that the warrant is a pretext to extradite him to the US, where he fears he could face espionage charges for publishing – video and documents leaked to his organization by Chelsea Manning.

Although Assange was granted asylum by Ecuador, he could not leave the embassy in UK to travel to Ecuador without fear of being arrested by UK authorities. Assange has not been charged yet with any crime and has long said he would submit to an interrogation by Swedish authorities at the Ecuadorean embassy, but Swedish prosecutors rejected the offer and insisted that Assange travel to Sweden for questioning.

Assange’s legal team sought to have the arrest warrant nullified by arguing that Swedish prosecutors acted improperly in not agreeing to interview Assange at the embassy, but a Swedish court rejected this bid. Judge Lena Egelin said that Assange is still suspected, with probable cause, of sex crimes; therefore the detention order would remain in effect.

Even if, after questioning, Assange manages to resolve the case against him in Sweden and authorities there drop their investigation, he still faces arrest for breach of bail in the UK if he leaves the Ecuadorean embassy. Safe passage for him out of England to take asylum in Ecuador would have to be negotiated with UK authorities. Until recently Metropolitcan police in the UK maintained permanent watch outside the embassy to prevent Assange from leaving, but recently dropped those patrols, according to the Guardian.