Locally produced complement fragments C5a and C3a provide both costimulatory and survival signals to naive CD4+ T cells.