Alongside sexual reproduction and multicellularity, eusociality is considered one of the major transitions in evolution (Szathmary and Smith 1995). Eusociality has evolved most often among the insects, particularly the Hymenoptera (the ants, bees and wasps) and termites. The hallmark of social evolution in insects is the appearance of permanently sterile castes, which is reflected by reproductive division of labour. A notable feature of insect societies is the emergence of sophisticated immune adaptations at the individual and group level to control the spread of disease. However, the evolution of termite immunity remains poorly understood. In particular, information regarding molecular evolution of the canonical immune pathways, and how innate and induced immunity were shaped by the evolution of a sterile caste system, remain major gaps in knowledge. A comparative approach in the study of the evolution of termite immunity requires robust knowledge of the immune system of the nearest non-social insect lineages: the cockroaches. To this end, the immunity of a cockroach, Blatta orientalis, was explored in Chapter I. Using de novo transcriptomes, a full repertoire of immune gene members was identified. Interestingly, expansions of immune gene families of receptors, including GNBP, PGRP and hemolymph LPS-binding protein (LPSBP) were identified. After immune challenging cockroaches with a mixture of heat-killed microbes (Bacillus thuringiensis, Pseudomonas entomophila, Saccharomyces cerevisiae), I was able to record a broad induced response in canonical immune pathways, pointing to the presence of effective and potentially long-lasting protection against infection, which is a key trait for organisms that thrive in a rich antigenic environment. In the first part of Chapter II, I examined the evolution of immunity in termites by first reconstructing a termite phylogeny with 19 newly sequenced transcriptomes and 16 available genomic datasets. As a result, we confirmed termites as the sister group to the Cryptocercus, a subsocial cockroach genus, and located their most recent common ancestor (MRCA) to the lower Jurassic. An evolutionary analysis of immune related gene families was then performed based on 18 of the newly sequenced transcriptomes. A family of antimicrobial peptide, Drosomycin, was found to be lost in the ancestor to the subsocial wood roaches and all termites. A further analysis of two other classic effectors, catalase and thioredoxin peroxidase, revealed a rapid contraction of related genes in the ancestor to all eusocial termite species. In addition, a family of receptors, C-type lectins (CTLs), showed contraction in the MRCA of Cryptocercus and termites as well as in the root of the Termitidae. In addition, these contracted gene families underwent a subsequent re-expansion in some individual higher termite lineages. These results suggest a substantial re-modelling of the termite immune system during the evolution of eusociality. This qualitative analysis focusing on major shifts in termite immunity was followed in the second part of Chapter II by a quantitative analysis of individual immunity across different castes of a representative lower termite, Neotermes castaneus. Gene expression changes were then compared with a subsocial wood roach, Cryptocercus meridianus, and the solitary cockroach, B. orientalis. Interestingly, I found evidence for higher investment into innate immunity in the reproductive termite caste as compared to sterile soldier caste members or false-workers. Furthermore, the induced immune response elicited in soldiers, but particularly in the reproductive caste mimicked the induced immune responses of C. meridianus and B. orientalis more closely than the response of false-workers. Additionally, the induced response to the same experimental immune challenge was remarkably similar between the subsocial C. meridianus and the solitary B. orientalis. From these results, I argue that the evolution of division of labor in termites was linked to the evolution of a fundamental change in individual immune defence between the sterile and non-sterile castes. In Chapter III, I expand on the role of the sterile caste in eusociality and immunity by examining the function of soldiers in social immunity in the Darwin termite, Mastotermes darwiniensis. In this chapter, M. darwiniensis soldiers are shown to contribute significantly to the social immunity of the colony by increasing the survival of groups of workers, probably via the secretion of potent orally-derived antimicrobial substances. In a comprehensive proteomic analysis, I demonstrate that M. darwiniensis soldier oral secretions possess a rich array of immune related proteins and enzymes involved in the biosynthesis of cytotoxins such as benzoquinone. These findings shed new light on termite societies, indicating that termites are likely to have evolved a sterile soldier caste with important functions not only in colony defence but also in social immunity. In this thesis I reveal how the termite immune system evolved during the transition to eusociality. I have established a robust foundation for the study of molecular immunity in termites and contributed new insights into the evolution of immunity in social animals in general. As the contraction and re-expansion of receptors and effectors in termites indicates, the function of a number of immune gene families should be examined in much greater detail. Furthermore, it will be particularly interesting to explore the individual immune (as well as general) responses of termite in a wider social context, particularly given the observed immune differences that were detected between the termite castes. Comparisons with immune adaptations in the Hymenoptera and other social animals would also be highly beneficial to understand commonalities and differences during this key evolutionary transition.