WikiLeaks founder Julian Assange speaks from the balcony of the Ecuadorean Embassy in London. File photo: Kirsty Wigglesworth/AP

Stockholm - Swedish prosecutors said on Friday they would drop a preliminary investigation into an allegation of rape against WikiLeaks founder Julian Assange on Friday, bringing to an end a 7-year legal stand-off.

"Chief Prosecutor Marianne Ny has today decided to discontinue the preliminary investigation regarding suspected rape concerning Julian Assange," the prosecutors office said in a statement.

Assange, 45, has lived in the Ecuadorean Embassy in London since 2012, after taking refuge there to avoid extradition to Sweden over the allegation of rape, which he denies.