Ectopic or tertiary lymphoid tissues develop at sites of inflammation or infection in peripheral, non-lymphoid organs. These tissues are architecturally similar to conventional secondary lymphoid organs, with separated B and T cell areas, specialized populations of dendritic cells, well-differentiated stromal cells and high endothelial venules. Ectopic lymphoid tissues are often associated with the local pathology that results from chronic infection or chronic inflammation. However, there are also examples in which ectopic lymphoid tissues appear to contribute to local protective immune responses. Here we review how ectopic lymphoid structures develop and function in the context of local immunity and pathology.