WikiLeaks founder Julian Assange has accepted a plea deal with the US government that will allow him to avoid jail time in the states over his leaking of top secret military information.

Assange is expected to plead guilty to violating the Espionage Act and receive credit for time served for the five years he spent behind bars in the UK while fighting extradition to the US, according to court documents and reports.

Assange, of Australia, was charged with conspiracy to obtain and disclose national defense information for releasing classified reports of the US wars in Afghanistan and Iraq on his WikiLeaks site, according to the documents.