Because of the remarkable developments in the Abbasid state in the first half of the 3rd AH century (the first half of the 9th AC century) when the city of Baghdad was in its prime and when the city of Samarra, a new temporary Abbasid capital, was founded, theorizing about the principles and methods of urban planning and general development in Islam was gaining its momentum. At any rate, the Islamic idea of planning, development and urbanization is as old as the Muslim community. Its fundamental principles have been comprehensively laid in the Holy Qur’an, as well as in the sayings and practices of the Prophet (pbuh). Certainly, the best example of the earliest Islamic planning, development and urbanization is the establishment of the Muslim community in Madinah in the wake of the migration (Hijrah) from Makkah. Henceforth, the matter was evolving steadily, corresponding with both the rapid spread of Islam throughout the world and the incredible growth of the civilization and cultures inspired by the Islamic worldview and its value system. However, it was not till towards the middle of the 3rd AH / 9th AC century that urbanism, urban development and city life commenced to be a considerable concern of some Muslim scholars’ speculative and philosophical thought. The reasons for this were related to the changes and developments of Islamic eclectic society, at the center of which stood the mosque institution as the society’s engine of growth, as well as to the expansion and diversification of Islamic socio-economic thought that resulted from the former.
The first scholar who extensively and systematically theorized about the principles and regulations of Islamic urban planning was Shihab al-Din Ahmad Ibn Abi al-Rabi’ (d. 272 AH / 885 AC). In his famous book Suluk al-Malik fi Tadbir al-Mamalik (The Manners of the Ruler in Administering People), Ibn Abi al-Rabi’ discussed — among other things as regards the city, state and Islamic polity — the requirements for planning and developing cities. The book was dedicated to the Abbasid caliph al-Mu’tasim (d. 227 AH / 842 CE) who built the city of Samarra. The book signified, in certain ways, some practical suggestions to the caliph as to the ways he ought to administer the country and its people, with the city of Samarra as the new Abbasid capital to function as a hub. The subject of planning cities and towns in the thought of Ibn Abi al-Rabi’ is just one aspect in a matrix of issues and ideas which must be duly considered if cities and towns with their populace were to achieve the desired standards of happiness and fulfillment.
It is interesting to note that Ibn Abi al-Rabi’ mentions as one of the eight conditions for establishing a fine city: “to build in the middle of a city a principal mosque (jami’) for prayers which will be near and accessible to all citizens”. Some other important conditions for an excellent city mentioned by Ibn Abi al-Rabi’ are related to the provision of sufficient and safe drinking water, networks of wide streets and roads, strategic and well supplied markets, a protective wall, housing according to tribal affiliations, and the presence of scholars, merchants and experts in various required fields.
It can be gauged from the exposition of Ibn Abi al-Rabi’ that during his time and the time of caliph al-Mu’tasim, the builder of the city of Samarra, placing a mosque in the middle of a Muslim settlement has become an urban regulation and standard from which there was no deviation. The importance of not just having a main mosque, but positioning it right in the middle of a city or a town as well, was on a par with the importance of the other indispensible elements vital for human existence, such as clean water, safety, security, economy, housing and human and natural resources.
Furthermore, the emphasis of Ibn Abi al-Rabi’ that the central mosque (jami’) is built for prayers only indicates that in the 3rd AH / 9th AC century the full institutionalization of a majority of the mosque’s earlier roles and functions was as good as complete, and that within its immediate domains the focus was less and less on certain social and political issues and problems. Physically, that focus was shifting somewhere else, although it might have been just outside the mosque’s boundaries in an institution — or institutions – which, technically, still operated under the jurisdiction of the mosque complex. Hence, the core of the mosque was increasingly associated with the sheer religious worshipping deeds rather than with the social, educational and political ones. That also meant that the scopes and frameworks of the new social institutions, which were gradually evolving from the initial roles and functions of the mosque, were becoming clearer and increasingly ascertained and pronounced.
It is also possible that Ibn Abi al-Rabi’ bracketed the mosque with prayers because prayers, which to a large extent symbolize all the religious established rituals and practices in Islam, were always the main and most frequently conducted activities inside mosques. He did not necessarily mean that only prayers were meant for the mosque. As a matter of fact, he could not claim such a thing, as mosques were always built for more than just prayers. That custom was to continue. What was set to change, however, was the mosque’s ways and means in maintaining its status as a community development center while responding to the novel and growing challenges that were facing the Islamic society. Surely, this shows that Ibn Abi al-Rabi’ was a pragmatist. He dwelled on the theme of Islamic urbanism on both its theoretical and practical planes.
Not so long after Ibn Abi al-Rabi’, al-Farabi (d. 339 AH / 950 AC), an outstanding Muslim scientist and philosopher, wrote on the theme of the ideal city in his famous work entitled al-Madinah al-Fadilah (the virtuous city). He affirms, for example, that the fashioning of a city is not the outcome of a natural process; it depends, like the moral life of individuals, on the right decision being taken, it makes all the difference whether ‘will’ and ‘choice’ are directed towards the true good or not. The result will be either a good or bad city.
Furthermore, according to al-Farabi, “the excellent city resembles the perfect and healthy body, all of whose limbs cooperate to make the life of the animal perfect and to preserve it in this state.” And since all the limbs and organs of the body are different and their natural endowments and faculties are unequal in excellence, there must be an organ which rules the rest of the organs. That ruling organ is the heart. Indeed, the same holds good in the case of the excellent city. Its parts are different by nature, and their natural dispositions are unequal in excellence. Thus, in the city there must be a perfect man, a ruler, who will rule the rest of the people. The best ruler is the one who combines the qualities of a wise man and a prophet, i.e., who combines revelation and reason, or religion and philosophy. That most ideal man to rule is a prophet, who is then succeeded by most qualified persons, imams or caliphs.
As maintained by al-Farabi, the ruler(s) of the virtuous and excellent city, the foundation and source of the policies by which the city will be governed, must align will, resourcefulness and energy with vision and pragmatism rooted in wisdom and knowledge. Wisdom and knowledge the ruler(s) must receive firstly by means of his predisposition to rulership by his inborn nature, and secondly from his fervent and fruitful relationship with the divine reality, i.e., the revelation conveyed to Prophet Muhammad (pbuh) and embodied in the Holy Qur’an and the Prophet’s sunnah. Due to his central qualities, such a ruler may well become something like a visionary forecaster capable of warning of things and problems that are yet to come and befall the city, as well as of telling of and solving particular predicaments which exist at present, unlike those who had detached themselves from divinity and through their faulty judgments missed the right path, bringing about, in consequence, nothing but ignorance and wickedness to their cities and people.
In his discussions, al-Farabi maintained that a city’s (a state’s) individuality is not exclusively determined by its character, its natural bent and its language. Each city (state) is distinguished by a special set of religious beliefs. No city or state is worth its name unless it adds religion as expressed in specific rituals and laws to its other distinctive features. In al-Farabi’s excellent and virtuous city, the ultimate goal of people’s existence is the attainment of definitive happiness, especially the spiritual one, which is tantamount to human perfection. Such a state of perfection and felicity can be achieved only through a symbiosis of the three most essential factors: firstly, having a perfect ruler (prophet-imam-philosopher) who tops the hierarchy of the city’s authorities and their noble voluntary actions; secondly, having order, harmony and mutual cooperation within the city, both among the people and their organized establishments or institutions, for no human being, not even the most perfect man, can reach the most excellent good alone and unaided; and thirdly, having a divine inspiration and guidance (Islam) as the only way and solution for a perfect city and the people’s happiness in it to materialize.
Although al-Farabi did not talk explicitly in his vision of the excellent city about the position and roles of the mosque institution as such, however, implicitly he puts forward its importance in realizing the dream of attaining the virtuous city (al-Madinah al-Fadilah). By accentuating the importance of the notions of the Qur’an and the Prophet’s sunnah, the true good, the guidance, virtues, the morals and qualities of the ruler(s) and the public, etc., in establishing and sustaining the virtuous and excellent city and its people, al-Farabi indirectly puts emphasis on the importance of the mosque and its status as a community development center, because the mosque in many ways is the symbol of everything that Islam stands for. The mosque too is a representation of all excellence and goodness. One certainly cannot speak about enlivening and practicing the Qur’an and the sunnah, or about the Islamic belief ad value systems, without having in mind the mosque phenomenon as an engine of transformation and growth in Islam and the Islamic society. Indeed, creating the excellent and virtuous city in Islam is conditioned by the presence of the visionary mosque. The mosque is a cause, the virtuous and excellent city with its excellent and upright leadership and citizens is an effect, and surely al-Farabi knew this logical equation very well.
In addition, al-Farabi’s determined efforts to harmonize between religion and philosophy, and between revelation and reason, as well as his belief that “the excellent city resembles the perfect and healthy body, all of whose limbs (the city’s people and institutions) cooperate to make the life of the animal perfect and to preserve it in this state”, and which is ruled by the body’s most excellent organ, the heart, (the city’s perfect ruler, prophet-imam-philosopher) – all this indicates that al-Farabi was a staunch supporter of what could be called an institutional ideological harmony, and not dichotomy, in an Islamic city. According to this principle, although the mosque’s original roles and functions during al-Farabi’s era experienced their full institutionalization and in some cases separation and full independence from the “mother” mosque institution, the multiple social, political and educational institutions had to remain united conceptually, spiritually and of course in reality, if an Islamic city was to remain healthy, productive and strong. Their respective philosophies, struggles and goals had to be aligned with the philosophy, struggle and goals of Islam which gave those institutions their distinctive identities and worth. Those institutions, furthermore, had to remain connected with the “mother” mosque institution with the threads of the Islamic faith and with a sense of responsibility towards its community (ummah) and its members which they served and from whose ranks they drew their inner self and strength. The opposite, namely an institutional ideological dichotomy, where the multiple social, political and educational institutions are at odds with each other and do not collaborate, especially with the mosque institution, thus serving separate ideological purposes and goals, that is a recipe for failure and despondency in a city.
Al-Farabi’s assertion that the excellent and virtuous city must be ruled by prophets-imams-philosophersas the most exceptional beings, and that the most ideal state was the city-state of Madinah when it was governed by Prophet Muhammad (pbuh) as its head of state, as he was in direct communion with Allah whose law was revealed to him — this unmistakably denotes the exclusive reputation and roles which al-Farabi has reserved for the mosque institution (as an epitome of Islam) in order that his vision of the excellent and virtuous city (al-Madinah al-Fadilah) is achieved. This is because in Madinah, the Prophet’s prototype Islamic city, and indeed in every other exemplary Islamic city, the institutions of the mosque and the Islamic leadership were inseparable, the former inspiring and guiding the latter, and the latter merely serving the interests of the former and its dignified message and purpose which, in turn, stood for the message and purpose of Islam and the whole Muslim community. It is true that he did not say it explicitly, but by insisting that the perfect ruler who embodies both the revelation and reason, the perfect Islam as an ideology and a philosophy, and the people whose worldly tasks could be summed up in the cooperative pursuing of human perfection and ultimate spiritual happiness, are inseparable and constitute the cornerstones of his excellent and virtuous city, al-Farabi thus indirectly endorsed and promoted the enormous significance of the mosque as a community or a city center and its broad spectrum of social, political, educational and religious roles and functions which embody virtually everything Islam stands for.
Around the same time as al-Farabi’s, in the 4th AH / 10th AC century, the brethren of purity (Ikhwan al-Safa) lived. The brethren of purity were a secret society of Muslim thinkers and philosophers who lived in Basra, in Iraq, under the Abbasid rule. It is noteworthy that their educational and ethical philosophy was outstanding. It was very much similar to that of al-Farabi though, by whom they might have been, to some extent, influenced. They, too, spoke of their utopian city or state, the state (city) of righteousness (Dawlah al-Khayr), which together with the people’s ultimate happiness is to be the final goal of the people’s personal and collective aspirations and strivings. Just like in the case of al-Farabi, the expositions of the philosophers of the brethren of purity on such issues as the meaning of man and society, the characteristics of the ruler, the hierarchy of authorities and people’s organizations and ranks in a city (state) and the nature of the relationships between them, happiness and the ways for attaining it, the prominent role of Islam in education and ethics, realizing the state (city) of righteousness (Dawlah al-Khayr), etc. – they implicitly championed and further promoted the case of the mosque as a community center which unmistakably personifies the message and struggle of Islam.
According to the ethical philosophy of the brethren of purity, the foundation of their utopian city (of righteousness) should be the consciousness of Allah (taqwa) so that its edifice will not crumble. The edifice of the city is to be enhanced with the truthfulness of words and the conviction of consciences, and its corners to be completed with constancy and trust so the edifice could last with a purpose and with the ultimate goal of attaining infinity in the perfect and lasting bliss. Thus, when the edifice of the city of righteousness is completed, it will become the ark of safety and refuge for people’s bodies and souls.
Finally, the extensive and systematic theorizing of Muslim philosophers about Islamic urbanism, which commenced with Shihab al-Din Ahmad Ibn Abi al-Rabi’ (d. 272 AH / 885 AC), reached its zenith in the late 8th and early 9th AH / late 14th early 15th AC century when Ibn Khaldun (733 AH / 1332 AC — 809 AH / 1406 AC) wrote about the city and city planning as part of his studies of the sciences of sociology and the philosophy of history.
It should be observed, firstly, that unlike some of his predecessors whose works were principally speculative and subjective in character, Ibn Khaldun’s approach was purely scientific. He affords room neither for utopian or subjective tendencies, nor for folk tales, legends, myths, fictions, and all that, to influence his inquiry into the concept of the city as well as the requirements for city planning and the consequences of neglecting those requirements.
Also, it is worth mentioning that it appears as though Ibn Khaldun regarded the city of Baghdad as a prime example of a good, effective and successful city. Ibn Khaldun’s explicated essential requirements for the planning and building excellent cities were to a large extent exemplified by the planning and development of Baghdad and the decision-makers behind it. This is understandable though, because with the creation and flourishing of the city of Baghdad, the process of both the development of Islamic urbanism and the full institutionalization of the mosque’s roles and functions, as the nerve center of the former, reached its high point – as we have seen earlier. Hence, Ibn Khaldun as a scholar of history and sociology found it most appropriate to dwell in his discourses more on the subject of planning and building the city of Baghdad than on the other Muslim cities, regarding it – it thus seems – as the best example of a how a city is to be planned and developed.
Shihab al-Din Ahmad Ibn Abi al-Rabi’, Suluk al-Malik fi Tadbir al-Mamalik (Cairo: Dar al-Sha’b, 1980), vol. 2 p. 420-423.
 Ibid., vol. 1 p. 422.
 Ibid., vol. 1 p. 422-423.
Al-Farabi on the Perfect State, a revised text with introduction, translation, and commentary by Richard Walzer, (Oxford: Clarendon Press, 1985), p. 433.
 Ibid., p. 231.
 Ibid., p. 233, 441.
Ibid., p. 245-253.
 Ibid., p. 432.
 Ibid., p. 432
 Ibid., p. 433.
Nadiyah Jamaluddin, Falsafah ‘ind Ikhwan al-Safa, (Cairo: Dar al-Kitab al-Masri, 2002), p. 184-257. FuadBaali, Society, State and Urbanism: Ibn Khaldun’s Sociological Thought, (Albany: State University of New York Press, 1988), p. 90.
 Nadiyah Jamaluddin, Falsafah ‘ind Ikhwan al-Safa, p. 254.
Ibn Khaldun, The Muqaddimah, Translated from the Arabic by Franz Rosenthal, Abridged and edited by N. J. Dawood, (London: Routledge and Kegan Paul, 1967), vol. 2 p. 237-247.
 Ibn Khaldun, Tarikh Ibn Khaldun, (Beirut: Dar al-Kitab al-Lubnani, 1958), vol. 3 p. 196.