This study of Abu Hamid al-Ghazali's Kitab adab al-nikah identifies influences which shaped the book's form and content. The study uses literary sources in Arabic from the Islamic tradition, including Islamic jurisprudence (fiqh), Sufi treatises, Arabicbelles lettres (adab) and medical literature. Three main influences are addressed: a religious debate on the merits of marriage, the particular Muslim attitude to sexuality, and the Islamic legal view of marriage. The Kitab adab al-nikah was written in the context of a religious debate on the merits of marriage and celibacy, a debate which first emerged in Sufi circles. The Kitab adab al-nikah directly responded to this controversy, providing the probably fullest discussion about marriage in mediaeval Islam and the most comprehensive list of reasons why mediaeval Muslims would marry. The first to openly challenge the institution of marriage was Abu Talib al-Makki in his Sufi treatise, the Qut al-Qulub. The Kitab adab al-nikah directly responds to the discussion of marriage in the Qut al-Qulub, and a substantial part of this study is therefore devoted to analysing the relationship between the two texts. Ghazali's argument in favour of marriage in the Kitab adab al-nikah is informed by a pragmatic and positive attitude towards sexuality, according to which a healthy, balanced life included sex. This attitude to sexuality reflected the prevailing mediaeval Muslim view of the place of sexuality in human life. Ghazali's view of sexuality is analysed and placed in the context of other Muslim writings on the subject. In pre-modern times, the institution of marriage in Muslim societies was governed exclusively by religious law, the sari`a. In the Kitab adab al-nikah, Ghazali provided a concise but exhaustive list of the laws governing this central Muslim institution according to the Shafi'i school of law, to which he belonged. Ghazali's list of the laws of marriage and divorce is complemented by the laws of the other three Sunni schools of law, as well as Shi'i law.