Julian Assange, the WikiLeaks founder who has long fought extradition from Britain to the United States, agreed on Monday to plead guilty to one count of violating the Espionage Act in exchange for a five-year prison sentence.

Under the agreement he will be freed, having already served that time while in British custody. The deal brought an abrupt end to an extraordinary legal saga that has raised novel issues of national security, press freedoms, politics and diplomacy.

Here is a timeline of significant events:

2006

Julian Assange, an Australian computer specialist, founds WikiLeaks with a mission of using the internet to help whistle-blowers bring hidden information to light. Operated by a transnational collective using servers in countries including Iceland and Sweden, it solicits classified, censored or otherwise restricted material for publication online.

2009

A U.S. Army intelligence analyst now known as Chelsea Manning downloads large batches of documents from a classified computer network and begins uploading them to WikiLeaks.