The following brief history of the mosque is taken from Samhoudy, the historian of Medina:

The mosque of Medina was founded by Mohammed himself, and is therefore called his mosque, or Mesdjed-e-Neby. When he reached the city, at that time an open settlement of Arabs, called Yathreb, (subsequently Medina) after his flight from Mekka, and was sure of being now among friends, he erected a small chapel on the spot where his camel had first rested in the town, having bought the ground from the Arabs; and he enclosed it with mud walls, upon which he placed a roof of palm-leaves, supported by the stems of palm-trees for pillars: this edifice he soon after enlarged, having laid the foundations with stone. Instead of the Mahrab, or niche, which is placed in mosques to show the direction in which the faithful ought to turn in their prayers, Mohammed placed a large stone, which was at first turned to the north, towards Jerusalem, and placed in the direction of the Kaaba of Mekka, in the second year of the Hedjra, when the ancient Kebly was changed.

Omar ibn el Khatab widened the mosque with mud walls and palm-branches, and, instead of the stems of palms, he made pillars of mud. He first carried a wall round the Hedjra, or the place where the body of Mohammed had been deposited at his death, and which was at first enclosed only by palm-branches. The square enclosed by the walls of the mosque was increased to one hundred and forty pikes in length, and one hundred and twenty in breadth, A.H. 17.

Othman built the walls of hewn stone: in A.H. 29, he renewed the earthen pillars, strengthening the new ones with hoops of iron, and made the roof of the precious Indian wood called Sadj. The square was enlarged to one hundred and sixty pikes by one hundred and fifty; and six gates were opened into it.

Wolyd, he to whom Damascus owes its beautiful mosque, called Djama el
Ammouy, further enlarged the Mesdjed-e-Neby in A.H. 91.

[p.351] Till then, the houses where the wives and daughter and female relations of Mohammed had resided, stood close to the Hedjra, beyond the precincts of the mosque, into which they had private gates. Notwithstanding the great opposition he encountered, Wolyd compelled the women to leave their houses, and to accept a fair price for them; he then razed them, and extended the wall of the mosque on that side. The Greek Emperor, with whom he happened to be at peace, sent him workmen from Constantinople, who assisted in the new building; [Makrisi, in his account of various sovereigns who performed the pilgrimage, says that the Greek Emperor (whom he does not name) sent one hundred workmen to Wolyd, and a present of a hundred thousand methkal of gold, together with forty loads of small cut stones, for a mosaic pavement.] several of whom, being Christians, behaved, as it is related, with great indecency; one of them, in particular, when in the act of defiling the very tomb of the Prophet, was killed by a stone which fell from the roof. New stone pillars were now placed in the mosque, with gilt capitals. The walls were cased with marble variously adorned, and parts of them likewise gilt, and the whole building thus completely renewed.

About A.H. 160, the Khalife El Mohdy still further enlarged the enclosure, and made it two hundred and forty pikes in length; and in this state the mosque remained for several centuries.

Hakem bamr Illah, the mad King of Egypt, who sent one of his emissaries to destroy the black stone of the Kaaba, also made an unsuccessful attempt to take from the mosque of Medina Mohammeds tomb, and transport it to Cairo. In A.H. 557, in the time of El Melek el Adel Noureddyn, king of Egypt, two Christians in disguise were discovered at Medina, who had made a subterraneous passage from a neighbouring house into the Hedjra, and stolen from thence articles of great value. Being put to the torture, they confessed having been sent by the King of Spain for that purpose; and they paid for their temerity with their lives. Sultan Noureddyn, after this, carried a trench round the Hedjra, and filled it with lead, to prevent similar attempts.

In A.H. 654, a few months after the eruption of a volcano near the

[p.352] town, the mosque caught fire, and was burnt to the ground; but the Korans deposited in the Hedjra were saved. This accident was ascribed to the Persian sectaries of Beni Hosseyn, who were then the guardians of the tomb. In the following year its restoration was undertaken at the expense of the Khalife Mostasem Billah, Ibn el Montaser Billah, and the lord of Yemen, El Mothaffer Shams eddyn Yousef, and completed by El Dhaher Bybars, Sultan of Egypt, in A.H. 657. The dome over the tomb was erected in 678. Several kings of Egypt successively improved and enlarged the building, till A.H. 886, when it was again destroyed by fire occasioned by lightning. The destruction was complete; all the walls of the mosque, and part of those of the Hedjra, the roof, and one hundred and twenty columns fell: all the books in the mosque were destroyed; but the fire appears to have spared the interior of the tomb in the Hedjra. Kayd Beg, then king of Egypt, to whom that country and the Hedjaz owe a number of public works, completely rebuilt the mosque, as it now stands, in A.H. 892. He sent three hundred workmen from Cairo for that purpose. The interior of the Hedjra was cleared, and three deep graves were found in the inside, full of rubbish; but the author of this history, who himself entered it, saw no traces of tombs. The original place of Mohammeds tomb was ascertained with great difficulty. The walls of the Hedjra were then rebuilt, and the iron railing placed round it which is now there. The dome was again raised over it; the gates were distributed as they now are; a new mambar, or pulpit, was sent as a present from Cairo, and the whole mosque assumed its present form. Since the above period, a few immaterial improvements have been made by the Othman Emperors of Constantinople.