LONDON — Six years after the Swedish authorities opened an investigation into a rape accusation made against Julian Assange, the WikiLeaks founder, he was questioned about the matter on Monday.

The questions were prepared by prosecutors in Sweden, where an arrest warrant for Mr. Assange was issued in 2010, but were posed by a prosecutor from Ecuador under an agreement the two countries made in August. Ecuador granted Mr. Assange political asylum in 2012, and the interview occurred at the Ecuadorean Embassy in London. Mr. Assange has lived in the embassy since June 2012 to avoid extradition to Sweden over the rape accusation.

WikiLeaks has published damaging and confidential information from the United States and many other governments. Before last week’s presidential election, WikiLeaks distributed hacked emails from the Democratic National Committee, while Mr. Assange has excoriated Hillary Clinton, the Democratic nominee.

No formal charges have been filed against Mr. Assange, a 45-year-old native of Australia. He denies the rape accusation, originally made in 2010, but has refused to go to Sweden to face questioning because he says he fears he would then be extradited to the United States. Swedish officials say those fears are ungrounded.