It was previously known that Ruhollah Khomeini, the charismatic leader of the Iranian revolution, had exchanged some messages with the US through an intermediary while living in exile in Paris. But new documents seen by the BBC’s Persian service show he went to a great lengths to ensure the Americans would not jeopardise his plans to return to Iran – and even personally wrote to US officials.

The BBC’s reporting suggests that the Carter administration took heed of Khomeini’s pledges, and in effect paved the way for his return by holding the Iranian army back from launching a military coup.

The BBC Persian service obtained a draft message Washington had prepared as a response to Khomeini, which welcomed the ayatollah’s direct communications, but was never sent.

The corporation also published a previously released but unnoticed declassified 1980 CIA analysis titled Islam in Iran, which shows Khomeini’s initial attempts to reach out to the US dated back to 1963, 16 years before the revolution.

The BBC’s reports have created a huge row in Iran: if true they would undermine the myth that Khomenei staunchly resisted any direct links with the US, which remained taboo for three decades until the recent nuclear negotiations.

Earlier this month, Khomeini’s successor, supreme leader Ayatollah Ali Khamenei, denied the report, saying it was based on “fabricated” documents.

Two former White House advisers to Jimmy Carter, speaking to the Guardian, did not question the authenticity of the documents but denied that the US had abandoned the shah.

In contrast to his later tirades against the “Great Satan”, Khomeini’s messages to US officials just weeks before his return to Tehran appear to have been strikingly conciliatory.

“It is advisable that you recommend to the army not to follow [Shah’s prime minister Shapour] Bakhtiar,” Khomeini said in one message, according to the BBC. “You will see we are not in any particular animosity with the Americans.”

In another message sent via a US emissary written in the same month, he attempted to assuage American fears that their economic interests would be affected by a change of power in Iran: “There should be no fear about oil. It is not true that we wouldn’t sell to the US.”

Khomeini returned to Tehran on 1 February 1979, two weeks after the shah had fled Iran. The Iranian military, which was under US influence, soon surrendered, and within months Khomenei was declared the supreme leader of a new Islamic republic.

Relations with the US were wary from the start, because America was closely identified with the shah’s regime, and links with Washington broke down completely in November 1979 when a group of students stormed the US embassy and took 52 diplomats hostage for 444 days.

But despite confrontational rhetoric on both sides, the revolution did not mark an end to direct talks between Iran and the US. The current president, Hassan Rouhani, is believed to have been involved in covert negotiations in which the US agreed to covertly ship arms to Tehran to secure the release of American hostages.

The 1980 CIA study says “in November 1963 Ayatollah Khomeini sent a message to the United States Government through [Tehran University professor] Haj Mirza Khalil Kamarei”, in which he explained “that he was not opposed to American interests in Iran” and that “on the contrary, he thought the American presence was necessary as a counterbalance to Soviet and possibly British influence”. Iranian leaders have vehemently denied that Khomeini ever sent such a message.