LONDON -- WikiLeaks founder Julian Assange says in a new memoir that he did not sexually assault two women who have accused him of rape, and he claims he was warned the U.S government was trying to entrap him.
"Julian Assange: The Unauthorized Autobiography" went on sale in Britain Thursday -- against the wishes of Assange, who condemned his publisher for releasing it.
In the book -- written by a ghostwriter who conducted 50 hours of interviews with the WikiLeaks chief -- Assange says "I may be a chauvinist pig of some sort but I am no rapist."
He says his two accusers "each had sex with me willingly and were happy to hang out with me afterwards."
Assange, 40, claims a Western intelligence contact warned him that the American government, angered by WikiLeaks' release of secret documents, was considering dealing with him "illegally" through rigged drug or sex allegations.
But he also says the sex charges may be the result of "a terrible misunderstanding that was stoked up" between his accusers.
WikiLeaks and its silver-haired frontman shot to worldwide prominence with a series of spectacular leaks of secret U.S. material, including the publication of about 250,000 classified State Department cables.
Assange has also become enmeshed in financial and legal woes, including the allegations of rape and sexual misconduct made last year by two Swedish women.
Assange was arrested and briefly jailed over the allegations in Britain in December. He is currently out on bail and living at a supporter's mansion in eastern England as he awaits a judge's decision on whether he will be extradited to Sweden. A ruling is expected within weeks.
The book, for which Assange says he agreed to advances of more than $1 million, was intended to help salvage WikiLeaks' precarious finances.
But after seeing the first draft, Assange got cold feet. Attempts to renegotiate the book deal were unsuccessful.
Assange accused his British publisher, Canongate, of "opportunism and duplicity" for publishing the unfinished book without his approval.
In a statement released to The Associated Press, he said the publisher had acted "in breach of contract, in breach of confidence, in breach of my creative rights and in breach of personal assurances."
Canongate said that since Assange had not repaid his advance -- which was handed over to lawyers to help pay his legal fees -- it had decided to publish the book.
Assange's U.S. publisher, Alfred A. Knopf, said it had canceled its contract with Assange and would not be releasing the memoir.
Canongate said it used extensive secrecy measures, including encrypted laptops and a ban on Internet communication, to ensure the news did not leak. Retailers were only told about the book a day in advance, and Assange said he was unaware it was being published until Wednesday afternoon.
"We have had books delivered under a level of security before, but not to this height," said Jon Howells, spokesman for the Waterstone's book store chain. "In publishing terms this is real 'Tinker, Tailor, Soldier, Spy' stuff."
The book traces Assange's life from his Australian childhood as the son of roving puppeteers through his time as a teenage computer hacker to the founding of the secret-spilling website and its release of war logs from Iraq and Afghanistan and other secret documents.
It also recounts Assange's fallout with media partners including The Guardian and New York Times newspapers, which had helped edit and publish the site's trove of secret documents.
News York Times editor Bill Keller, Assange says, turned from "hungry collaborator to ungrateful avenger." The Guardian staff are described as "lily-livered gits hiding in their glass offices."
Assange notes angrily that WikiLeaks' former media partners "thought of us as a bunch of weird hackers and sexual delinquents."
The book includes an accounts of Assange's nine days in London's Wandsworth Prison in December, where he reads Aleksandr Solzhenitsyn and muses about prison predecessor Oscar Wilde while enduring "a Kafkaesque miasma of passive aggression and hindrance."
Canongate publishing director Nick Davies defended the book as a "nuanced and balanced portrait" of a complex individual.
"He has been portrayed as this Bond villain or a character from a Stieg Larsson novel ... but what comes through here is this very human portrait of Julian, warts and all," he said.