SAIPAN, Northern Mariana Islands/CANBERRA, June 26 (Reuters) - WikiLeaks founder Julian Assange walked free on Wednesday from a court on the U.S. Pacific island territory of Saipan after pleading guilty to violating U.S. espionage law, in a deal that allowed him to head straight home to Australia.

His release ends a 14-year legal saga in which Assange spent more than five years in a British high-security jail and seven years in asylum at the Ecuadorean embassy in London battling extradition to Sweden on sexual assault allegations and to the U.S., where he faced 18 criminal charges.

Those charges stemmed from WikiLeaks' release in 2010 of hundreds of thousands of classified U.S. military documents on Washington's wars in Afghanistan and Iraq - one of the largest breaches of secret information in U.S. history.

During a three-hour hearing in Saipan, Assange pleaded guilty to one criminal count of conspiring to obtain and disclose classified national defence documents but said he had believed the U.S. Constitution's First Amendment, which protects free speech, shielded his activities.

"Working as a journalist I encouraged my source to provide information that was said to be classified in order to publish that information," he told the court.

"I believed the First Amendment protected that activity but I accept that it was ... a violation of the espionage statute."

Chief U.S. District Judge Ramona V. Manglona accepted his guilty plea, noting that the U.S. government indicated there was no personal victim from Assange's actions.

She wished Assange, who turns 53 on July 3, an early happy birthday as she released him due to time already served in a British jail.

While the U.S. government viewed Assange as reckless for putting its agents at risk of harm by publishing their names, his supporters hailed him as a hero for promoting free speech and exposing war crimes.

"We firmly believe that Mr. Assange never should have been charged under the Espionage Act and engaged in (an) exercise that journalists engage in every day," his U.S. lawyer, Barry Pollack, told reporters outside the court.

He said WikiLeaks' work would continue.

Assange's UK and Australian lawyer Jennifer Robinson thanked the Australian government for its years of diplomacy in securing Assange's release.

"It is a huge relief to Julian Assange, to his family, to his friends, to his supporters and to us and to everyone who believes in free speech around the world that he can now return home to Australia and be reunited with his family," she told reporters outside the court.

Assange, left the court through a throng of TV cameras and photographers without answering questions, then waved as he got into a white SUV.

He left Saipan on a private jet to the Australian capital Canberra, where he is expected to land around 7:30 p.m. (0930 GMT), according to flight logs.

"That Julian can come home to Australia and see his family regularly and do the ordinary things of life is a treasure," his father, John Shipton, told Reuters in Canberra, where he was waiting for his son's return.

"The beauty of the ordinary is the essence of life."

Photo from Reuters