Larijani, who is also a close aide to Iran's supreme leader Ayatollah Ali Khamanei, described the talks as "positive and constructive".
Tehran cut diplomatic ties with Egypt after the latter signed a peace agreement with Israel in 1979 and provided asylum for Mohammad Reza Pahlavi, the deposed Shah of Iran.
Tehran's support of some Iraqi Shia groups, Lebanon's Hezbollah and the Palestinian Hamas has further affected relations with Cairo, resulting in very limited diplomatic contacts between the two countries.
Egypt has always maintained that normal ties with Iran will come only after Iran stopped meddling in the internal affairs of Arab countries.
Larijani's visit comes amid a thaw between the two regional heavyweights. It followed a visit last month to Tehran by Hussein Darar, Egypt's deputy foreign minister, and a preceding visit to Cairo in September by Abbas Araghchi, Darar's counterpart.
|Ahmadinejad has repeatedly offered to |
restore ties with Egypt, a US ally[AFP]
In May, Mahmoud Ahmadinejad, Iran's hardline president, offered to restore ties with Egypt, a US ally. At the time, Ahmadinejad said his country was ready to open an embassy in Cairo as soon as Egypt agreed to do the same in Tehran.
The Iranian president has since repeated his offer, most recently last Wednesday.
During an almost week-long stay, Larijani met with top officials, including Omar Suleiman, Egypt's powerful intelligence minister, Grand Sheik Mohammed Sayed Tantawi and other officials of Al-Azhar, Sunni Islam's prominent religious institution.
He also held talks with Amr Moussa, the secretary-general of the Cairo-based Arab League who urged better Arab ties with Tehran.
There were also reports that Tehran has agreed to provide Egypt with badly needed wheat at lower prices.
However, some thorny issues still remain.
"This is a side issue, we have talked about more important and essential ones"
Ali Larijani, a member of Iran's powerful National Security Council
Aboul Gheit has said that full diplomatic relations can only be restored if Iran takes down a large mural of Khaled el-Islambouli, former Egyptian president Anwar Sadat's assassin, and change the name of a street honouring him.
El-Islambouli was one of the army officers who assassinated Sadat during a military parade in 1981. Egypt executed him by firing squad soon after.
Several times over the last few years, Tehran has said it will change the street name, but the image of el-Islambouli shouting behind bars marked with a Star of David continues to loom down over the street bearing his name.
Larijani played down the issue at a press conference before leaving.
"This is a side issue, we have talked about more important and essential ones," he said.