Two historical events occurred in Egypt that eventually contributed to the official recognition of the Baha'i Faith as an independent religion. The first of which occurred in 1925, as a consequence of a fierce attack on Bahai's after the formation of the Baha'i Spiritual Assembly in the district of Beba located in the southern province of Beni Suef. The notary of the village of Kawmu's-Sa'ayidih initiated an action against three Baha'i men demanding that their wives be divorced from them on the grounds that the men had converted to the Baha'i Faith having been previously wed as Muslims.
The Appellate religious court of Beba annulled their marriages and condemned them as heretics for abandoning Islam. This decision was sanctioned and upheld by Egypt's highest ecclesiastical court in Cairo.
Alexandria Baha'is circa 1940
In order to enforce its verdict to divorce these men from their wives, the court declared most emphatically: "The Baha'i Faith is a new religion, entirely independent, with beliefs, principles and laws of its own, which differ from, and are utterly in conflict with, the beliefs, principles and laws of Islam. No Baha'i, therefore, can be regarded a Muslim or vice-versa, even as no Buddhist, Brahmin, or Christian can be regarded as Muslim or vice-versa."
This decision asserted the independence of the Baha'i Faith in the heart of the Islamic world, and led to its acceptance as an independent religion, and the official recognition of its elected Institutions initially in Egypt, Palestine, Persia, and the United States of America.
The second event occurred in the late 1930s in Ismailia, a town located in the eastern part of the country on the shores of the Suez Canal. In that city, the Baha'i community was well established, active and flourishing. It was also where the Muslim Brotherhood movement started in the 1920s by its founder and leader Hassan el-Banna. As is the case now, the Muslim fundamentalist movement was determined to violently oppose the Baha'i Faith, and was awaiting an opportunity to inflame the masses and justify its attacks on the Bahai's.
A prominent Baha'i named Muhammad Sulayman had passed away and his funeral procession was on its way to the cemetery. An angry mob surrounded the cortege with the intention to burn the body and then proceed to burn Baha'i homes. The police interfered and brought the body back to his home. Mr. Sulayman was later buried in the desert at the edge of the city late at night. The crowd's justification for the uproar was that the deceased was not a Muslim, and thus could not be buried in a Muslim cemetery.
As a consequence of that event, the Egyptian Baha'i National Spiritual Assembly requested the allocation of cemetery plots in the cities of Ismailia, Port-Said, Alexandria and Cairo. After complex negotiations and communications between the Ministry of Interior, the Ministry of Justice and the Grand Mufti of Egypt regarding whether or not the Baha'is could be buried in Muslim cemeteries, the Mufti wrote to the Ministry of Justice: "We are in receipt of your letter...dated February 21, 1939, with its enclosures...inquiring whether or not it would be lawful to bury the Baha'i dead in Muslim cemeteries. We hereby declare that this [Baha'i] community is not to be regarded as Muslim, as shown by the beliefs which it professes. The perusal of what they term 'The Baha'i Laws affecting Matters of Personal Status,' accompanying the papers, is deemed sufficient evidence. Whoever among its members had formerly been a Muslim has, by virtue of his belief in the pretensions of this community, renounced Islam, and is regarded as beyond its pale, and is subject to the laws governing apostasy as established in the right Faith of Islam. This community not being Muslim, it would be unlawful to bury its dead in Muslim cemeteries, be they originally Muslims or otherwise...."
As a result of this clear pronouncement by the highest ecclesiastical authority in the land and the Islamic world, the government granted two cemetery plots to the Baha'is, one in Cairo and the second in Ismailia. Subsequently the remains of the legendary Mirza Abu'l-Fadl were transferred to the Cairo Baha'i cemetery, and those of Mrs. E. Getsinger were transferred from the Christian cemetery to the Baha'i cemetery in Cairo. These transfers were carried out with great dignity and respect due to each one of these illustrious Baha'is.
Ismailia Baha'is & visitors circa 1950
These two landmark decisions, even though on their face appeared to present as great crises and challenges to the Baha'is, the first causing separation of married couples, and the second accusing the Baha'is of apostasy punishable by death, had caused the recognition of the Baha'i Faith as an independent religion. Those decisions contributed to the ultimate emancipation of the Baha'i Faith and its official acceptance worldwide as a free-standing world religion in its own right. Also, as a result of these severe tests and crises, the Baha'i Faith in Egypt became more widespread and its roots grew stronger than ever before.
Reference: God Passes By: pages 364-375 (Shoghi Effendi). Complete chapter could be accessed here.