included Iraq and North Korea, were confirmed by U.S. officials and a former Iranian official.
They illustrate a U.S. desire, dating to the start of Obama's administration in January 2009, to explore whether there might be a way to reconcile two nations that have been hostile since 1979 but were once allies.
According to the U.S. official, who spoke on condition of anonymity, key Americans involved in the effort were William Burns, the U.S. deputy secretary of state, and Jake Sullivan, the national security adviser to U.S. Vice President Joe Biden.
The two men, at times with other officials such as White House national security staff member Puneet Talwar, met Iranian officials at least five times this year, the official said.
Burns, Sullivan and technical experts arrived in Muscat, Oman in March on a military plane - a way to preserve secrecy - to meet Iranians, the official added.
That was months before the election of Rouhani, a sign that Iranian officials were already coming round to the idea of talks before he took power.
Rouhani defeated more hardline candidates based in part on hopes he would ease sanctions that had taken an increasing severe toll on the Iranian economy since they were sharply tightened by the United States and European Union to hit Iran's crucial oil exports since 2011.
A former nuclear negotiator, Rouhani replaced the combative Mahmoud Ahmadinejad. But ultimately no negotiations would have been possible without a nod from the supreme leader, Khamenei.
"The leader gave the green light but was not optimistic about the result," said a former Iranian official, who participated in one round of the secret talks. He said the hardest meeting was the first one because of Khamenei's scepticism.
The Oman channel itself had been nurtured by Kerry, who, as chairman of the U.S. Senate Foreign Relations Committee before he took over as Secretary of State, made an unannounced trip to the Gulf state to meet Omani officials.
After Kerry replaced Hillary Clinton as the top U.S. diplomat on February 1, it was decided the Oman channel would continue to help feed into multi-lateral talks led by the EU's Ashton on behalf of the five permanent U.N. Security Council members plus Germany, the P5+1. Kerry visited Oman himself in May for talks with Omani officials.
Around the time that Kerry was taking over the State Department, Zarif's predecessor, Ali Akbar Salehi - then serving as foreign minister under Ahmadinejad - sent an extraordinary