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.
In a step by Iran to advance ties that were broken in 1979, the Iranian foreign minister said Egyptian tourists and merchants would no longer require visas to visit, Egypt's state news agency reported.
The effort drew a cool response, however. Shi'ite Islamist Iran is still looked on with suspicion by many in Egypt, a predominantly Sunni Muslim nation. Points of contention include Iran's support for Syrian President Bashar al-Assad and its policies elsewhere in the Arab world.
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 as telling Egyptian journalists.
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 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 showed what appeared to be a bearded man trying to throw a shoe at Ahmadinejad as he was mobbed by wellwishers 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.
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 the 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.
($1 = 6.7015 Egyptian pounds)
(Writing by Paul Taylor; Editing by Philippa Fletcher and Angus MacSwan)