UNITED NATIONS (Reuters) - Iranian President Mahmoud Ahmadinejad sent a message to Barack Obama in 2009 via Mohamed ElBaradei that he wanted direct talks with the US, the former UN nuclear chief wrote in his memoirs. Not long after taking office in January 2009, President Obama announced that he was willing to engage with Iran but that Tehran would have to cooperate to resolve its standoff with major Western powers and their allies over Iran's nuclear program, which the West suspects is aimed at weapons. Tehran reacted coolly to the outstretched hand of Obama, who had distanced himself from the policies of his predecessor George W. Bush, whose administration sought to isolate and punish Iran for not halting its uranium enrichment program. In September 2009, Obama's office told ElBaradei, who was in the final months of his 12-year stint as head of the U.N. International Atomic Energy Agency (IAEA), that the U.S. president would soon be calling him. ElBaradei alerted the Iranians and asked them if they had a message for Obama. "A message had come back from Ahmadinejad saying that he was 'ready to engage in bilateral negotiations, without conditions and on the basis of mutual respect,'" ElBaradei wrote in his memoirs, which will reach bookstores in April. A copy was obtained by Reuters. "There were additional details, related to Iran's willingness to help in Afghanistan and elsewhere," he said. The publisher, Henry Holt and Company, moved up the publication date of the Egyptian lawyer and diplomat's memoirs by several months because of the recent demonstrations in Egypt, where ElBaradei became a high-profile member of the opposition to President Hosni Mubarak, who resigned last week. When Obama called, ElBaradei gave him the message from Ahmadinejad along with his own view that the United States "should focus as soon as possible on the bilateral track" as opposed to the six-nation group known as the "P5+1" -- the five permanent Security Council members and Germany. "Obama listened and thanked me for my advice," he said. The delivery of Ahmadinejad's private message for Obama came shortly before a key meeting of the P5+1 in Geneva, at which the United States, Britain, France, Germany, Russia and China offered Iran the possibility to begin building confidence by taking part in an IAEA-brokered uranium fuel swap deal. Obama agreed to back a plan to enable Iran to ship most of its enriched uranium out of Iran to Russia and France to make fuel for a reactor that produces isotopes for treating cancer. Tehran, which denies developing atomic weapons, accepted the deal in principle but later imposed new conditions on it. ElBaradei describes how Ahmadinejad, who had been persuaded to accept the fuel proposal by his atomic energy chief Ali Akbar Salehi, had trouble selling the deal in back in Tehran. Western leaders compounded the difficult situation for Ahmadinejad, ElBaradei writes. Ahmadinejad became especially annoyed by French president Nicolas Sarkozy, who he said was "impolite". He was also "insulted" that Obama ignored his congratulatory message after winning the 2008 election. Ahmadinejad later became "irate" after U.S. Secretary of State Hillary Clinton criticized Iran's human rights record. Ahmadinejad, who had previously prevented other Iranian officials from securing a suspension of the enrichment program to resolve the standoff with the West, now found himself the victim of domestic bickering and could win did not win support for the fuel swap, ElBaradei said. The final nail in the coffin of the fuel swap plan came when Clinton announced in May 2010 that the U.S. response to a revised version of the deal agreed in Tehran the previous day with Brazil and Turkey was to submit a new U.N. sanctions resolution to the Security Council that passed in June 2010. "The Western powers once more had touched a solution only to brush it away with their fingers," he said. The idea of direct U.S.-Iranian talks never really got off the ground. ElBaradei raises the question of whether Clinton's tough rhetoric was "the result of a lack of good judgement or some sort of attempt to undermine Obama's engagement with the Iranians." He does not provide an answer.