Mahir arrived on Monday shortly after 11:00pm (2100 GMT) at the Almaza Airbase in eastern Cairo where he'd left from earlier in the day.
The minister, 68, was admitted to a hospital in Jerusalem for three hours. Witnesses said that some 200 Palestinian worshippers shouted "traitor" at Mahir after he tried to pray at the al-Aqsa mosque compound, Islam's third holiest site, in occupied East Jerusalem.
He was also shoved and heckled before fainting. Mosque guards formed a human chain around him as he left the scene. Mahir's spokesman Tariq Adal earlier said that the minister was in good health and that the "incident was blown out of proportion".
The incident occurred while Mahir rounded off a one-day visit to Israel during which he held talks with Israeli Prime Minister Ariel Sharon and Foreign Minister Silvan Shalom.
Palestinian PM Ahmad Quraya
slammed the attack on Mahir
His visit was intended to be an important step towards improving strained ties between Egypt and Israel after the Intifada against Israel's occupation erupted three years ago.
Israeli police said that they had detained at least five Palestinians believed to be connected with the incident.
Their identities have not been revealed.
Meanwhile, the Arab League joined the growing chorus of criticism of the attack.
"We condemn and denounce this criminal act," said Said Kamal, the league's deputy secretary general who oversees Palestinian affairs.
Mahir is "known for his strong support of the Palestinian people," he added.
Earlier, Egyptian President Mubarak issued a statement saying that he "deeply regrets the attempts made by a small group of irresponsible Palestinians to assault Foreign Minister Mahir."
Palestinian Prime Minister Ahmad Quraya told Aljazeera that he was "shocked and furious" over the attack on Mahir, whose country signed the Arab world's first peace treaty with Israel in 1979.