By Tom Perry
CAIRO (Reuters) - President Mahmoud Ahmadinejad, on the first visit to Cairo by an Iranian leader in more than three decades, called for a strategic alliance with Egypt and said he had offered the cash-strapped Arab state a loan, but drew a cool response.
Ahmadinejad said outside forces were trying to prevent a rapprochement between the Middle East's two most populous nations, at odds since Iran's 1979 Islamic revolution and Egypt's signing of a peace treaty with Israel in the same year.
"We must all understand that the only option is to set up this alliance because it is in the interests of the Egyptian and Iranian peoples and other nations of the region," the official MENA news agency quoted him in remarks to Egyptian journalists published on Wednesday.
The two countries have not restored diplomatic ties since Egypt overthrew its long term leader Hosni Mubarak in 2011, but its first Islamist president, Mohamed Mursi, gave Ahmadinejad a red-carpet welcome on Tuesday to a summit of Islamic nations.
"There are those striving to prevent these two great countries from coming together despite the fact that the region's problems require this meeting, especially the Palestinian question," Ahmadinejad said.
Egypt's foreign minister played down the significance of the visit, telling Reuters the Iranian leader, one of several heads of state to get the red-carpet treatment, was in Cairo chiefly for the Islamic summit beginning on Wednesday, "so it's just a normal procedure. That's all."
He had earlier reassured Gulf Arab countries that Egypt would not sacrifice their security.
Egypt's leading Sunni Muslim scholar scolded Ahmadinejad on Tuesday when he visited the historic al-Azhar mosque and university over Tehran's attitude to its Gulf Arab neighbors and attempts to spread Shi'ite influence in Sunni countries.
In his meeting with Egyptian reporters, MENA said Ahmadinejad denied accusations Iran was interfering in Bahrain, where a Shi'ite majority lives under minority Sunni rule.
Three Egyptians and a Syrian were detained on suspicion of trying to attack the Iranian president at another mosque, security sources said. They were held overnight but released on bail of 500 Egyptian pounds ($75) each on Wednesday.
Video footage shot by a Turkish cameraman appeared to show a bearded man trying twice to throw a shoe at Ahmadinejad as he was mobbed by well-wishers on leaving the Hussein mosque.
The president was not hit but was hustled to his car by security men, stopping to wave before he was driven away.
The security sources said the three Egyptians held were all members of the al-Gamaa al-Islamiya, a hardline Islamist group that took up arms against the state in the 1990s but has moved into mainstream politics since Mubarak was toppled.
In the Arab world, throwing a shoe is a serious insult. An Iraqi journalist hurled a shoe at then-U.S. President George W. Bush during a news conference in Baghdad in 2008, forcing Bush to duck to avoid being hit.
Al-Ahram daily quoted Ahmadinejad as saying in an interview that Iran had offered to lend money to Egypt despite being under international economic sanctions over its nuclear program.
"I have said previously that we can offer a big credit line to the Egyptian brothers, and many services," he said. He did not say if there had been any response.
The president said the Iranian economy had been affected by sanctions but it is a "great economy" that was witnessing "positive matters", saying exports were increasing gradually.
The United States and its Western allies have sought to choke off Iran's vital oil exports by embargoing imports from the Islamic republic and cutting its access to shipping, insurance and finance.
Egypt disclosed on Tuesday that its foreign reserves had fallen below the $15 billion level that covers three months' imports despite recent deposits by Qatar to support it.
Tourism has been badly hit by unrest since the uprising that toppled authoritarian Mubarak, and investment has stalled due to the ensuing political and economic uncertainty.
Ahmadinejad said there had been scant progress on restoring ties between the two countries.
"No change happened in the last two years, but discussions between us developed and grew, and His Excellency President Mohamed Mursi visited Iran and met us, as he met the Iranian foreign minister. And we previously contacted Egypt to know about what is happening with Syrian affairs," he said.
One persistent obstacle to ties in Cairo's eyes was the naming of a street in Tehran after an Egyptian Islamist militant who led the 1981 assassination of President Anwar Sadat, who signed the treaty with Israel.
"On the question of the street name or its removal, these are matters that will be dealt with gradually," Ahmadinejad said.
(Writing by Paul Taylor; editing by Philippa Fletcher)