CAIRO — Iran's president on Wednesday offered to help rescue Egypt's failing economy with a "big credit line," another sign of improving relations between two regional powers after a freeze of more than three decades.

Mahmoud Ahmadinejad made the proposal during the first trip to Egypt by an Iranian leader since 1979. It came at a time when his own economy is staggering from the effects of Western sanctions over Iran's suspect nuclear development program, and it was unclear how he could spare funds or credit for his new ally.

The latest bad news for Egypt's economy came Tuesday with an announcement that the country's foreign currency reserves dropped 10 percent in the past month. Even before that, the treasury warned that the reserves were at a "critical" low point.

Egypt's government had no immediate reaction to Ahmadinejad's offer, made in an interview with the state-run Al-Ahram daily.

"We can provide a big credit line to our Egyptian brothers," he told the paper. "If the two peoples cooperate and join forces, they can become an important element."

Egypt and Iran have grown closer since President Mohammed Morsi of the Muslim Brotherhood took power in Egypt last summer. The two countries severed relations after the 1979 Islamic revolution and Egypt's peace treaty with Israel the same year.

Ahmadinejad is attending an Islamic nations summit in Cairo but arrived a day early for talks with Egyptian leaders.

Ahmadinejad's reception in Egypt has not been entirely welcoming. On Tuesday, he had to flee an ancient mosque in downtown Cairo after a Syrian protester took off his shoes and threw them at him, an especially grave insult in the Arab world. Iran is Syrian President Bashar Assad's main regional ally in the civil war there.

Then Egypt's most prominent cleric chided Ahmadinejad for interfering in the affairs of Sunni nations. Iran is the leading Shiite Muslim power. Egypt and other Mideast nations are predominantly Sunni.

In the Al-Ahram interview, he tried to downplay the concerns with a story.

"For example, 40 people are sitting in a bus and they differ among themselves, but they are all heading to the same destination and to the same goal," he said in reference to Muslim world. "What is common among us is bigger than our differences."

Also on HuffPost:

Loading Slideshow...
  • On Bibi’s U.N. Bomb Prop:

    “Whoever talks of war against Iran <a href="http://www.huffingtonpost.com/2012/10/02/ahmadinejad-netanyahu-un-bomb-prop_n_1932783.html?utm_hp_ref=world">is</a> retarded...” <em>Caption: Mahmoud Ahmadinejad, President of the Islamic Republic of Iran addresses the 65th session of the General Assembly at the United Nations on September 23, 2010 in New York City. (Photo by Chris McGrath/Getty Images)</em>

  • More On Bibi’s U.N. Bomb Prop:

    “[Bibi] really ought to work <a href="http://www.huffingtonpost.com/2012/10/02/ahmadinejad-netanyahu-un-bomb-prop_n_1932783.html?utm_hp_ref=world">on</a> his drawing..." <em>Caption: Benjamin Netanyahu, Prime Minister of Israel, points to a red line he drew on a graphic of a bomb while addressing the United Nations General Assembly on September 27, 2012, in New York City. (Photo by Mario Tama/Getty Images)</em>

  • On Homosexuality In Iran:

    "Gays? What <a href="http://thinkprogress.org/politics/2007/09/24/16472/ahmadinejad-denies-existence-of-gays-in-iran/?mobile=nc">gays</a>?" <em>Caption: Iranian President Mahmoud Ahmadinejad waits to greet Armenian Foreign Minister Edward Nalbandian (unseen) in Tehran on September 17, 2011, during an official visit to the Islamic Republic. (ATTA KENARE/AFP/Getty Images)</em>

  • On Democracy:

    "All this talk of democracy has <a href="http://www.bbc.co.uk/persian/science/story/2007/04/printable/070419_he-mb-press.shtml">made</a> people sick to their stomach." <em>Caption: Iranian President Mahmoud Ahmadinejad makes a speech during a visit, on November 7, 2007, to the city of Birjand 1000 km (621 miles) east of Tehran, Iran. (Photo by Majid/Getty Images)</em>

  • On The Economy:

    “In the past two years, I have done wonders for the Iranian economy. Even economists <a href="http://www.aftabnews.ir/vdcgyu93.ak9zn4prra.html">agree</a> that I have been a miracle.” <em>Caption: Iranian President Mahmoud Ahmadinejad gestures during a rally on Tehran's Azadi Square (Freedom Square) on February 11, 2011 in which the Islamic republic's President lashed out at the West and Israel in a speech marking the 32nd anniversary of the Islamic revolution. (ATTA KENARE/AFP/Getty Images)</em>

  • On Sanctions:

    “These [Western] countries should <a href="http://www.khabaronline.ir/news-63882.aspx">know</a> that if they disrespect the Iranian people and attempt to violate their rights, the Iranian people will smack them in the mouth so hard that they will lose their way home." <em>Caption: Iranian President Mahmoud Ahmadinejad makes a speech during a visit, on November 7, 2007, to the city of Birjand 1000 km (621 miles) east of Tehran, Iran. (Photo by Majid/Getty Images)</em>

  • On Foreign Policy:

    “Iran's image in the world today <a href="http://hamshahrionline.ir/details/62094">is</a> very lovable." <em>Caption: Iranian President Mahmoud Ahmadinejad smiles during a press conference in Tehran on April 4, 2011, during which he said that the United States and its allies pressured Gulf Arab states to accuse Iran of interfering in the region, and also demanded Saudi forces leave Bahrain. (BEHROUZ MEHRI/AFP/Getty Images)</em>

  • On Iran’s Souring Relationship With Saudi Arabia:

    “My dear brother, King Abdullah, gave me permission to sit next to him during my trip to Riyadh...” <em>Caption: Saudi King Abdullah bin Abdul Aziz (R) greets Iranian President Mahmoud Ahmadinejad (L) upon his arrival at the airport in Riyadh 03 March 2007. (HASSAN AMMAR/AFP/Getty Images)</em>

  • On Opposition Demonstrators:

    "They are nothing <a href="http://www.guardian.co.uk/world/2009/jun/18/ahmadinejad-iran-insults-dirt-dust">but</a> scattered specks of dirt and dust..." <em>Caption: Hundreds of thousands of Iranian opposition demonstrators fill the squares between Revolution and Freedom (background) in support of defeated reformist presidential candidate Mir Hossein Mousavi, in Tehran on June 15, 2009, following an election that has divided the nation. (BEHROUZ MEHRI/AFP/Getty Images)</em>

  • On Intellectuals:

    "They know less than <a href="http://www.youtube.com/watch?v=AoYlugcZ96M&playnext=1&list=PL86A9CEA44C3B708F&feature=results_main">a </a>baby goat..." Caption: Iranian President Mahmoud Ahmadinejad walks to the podium for his address to world leaders at the United Nations General Assembly on September 26, 2012. (Photo by Spencer Platt/Getty Images)