Background: HIV type 2 (HIV-2) is considered more benign and has fewer pathogenic consequences than HIV type 1 (HIV-1) for most infected individuals. However, reliable estimates of time to AIDS and mortality among those with HIV-2 infection are absent. We therefore aimed to compare the time to AIDS and mortality, and the CD4 T-cell dynamics between those infected with HIV-1 and HIV-2. Methods: We did a prospective open cohort study. We included all police officers with regular employment from police stations in both urban and rural areas of Guinea-Bissau since Feb 6, 1990. We continued to include participants until Sept 28, 2009, and follow-up of HIV-1-positive and HIV-2-positive individuals continued until Sept 28, 2013. We collected blood samples at enrolment and at scheduled annual follow-up visits at police stations. We analysed longitudinal data from individuals infected with HIV-1 and HIV-2 according to time to AIDS, time to death, and T-cell dynamics. Time of HIV infection was estimated as the mid-timepoint between last HIV-seronegative and first HIV-seropositive sample. Data from an additional 2984 HIV-uninfected individuals from the same population were analysed to assess the effect of natural mortality on HIV-related mortality. Findings: 872 participants tested HIV positive during the 23-year study period: 408 were infected with HIV-1 (183 infected before and 225 infected after enrolment) and 464 were infected with HIV-2 (377 before and 87 after enrolment). The median time from HIV infection to development of AIDS was 6·2 years (95% CI 5·4–7·1) for HIV-1 infection and 14·3 years (10·7–18·0) for HIV-2 infection (p<0·0001). The median survival time after HIV infection was 8·2 years (95% CI 7·5–8·9) for HIV-1 infection and 15·6 years (12·0–19·2) for HIV-2 infection (p<0·0001). Individuals who were infected with HIV-1 or HIV-2 before enrolment showed similar results. Comparison with uninfected individuals indicated limited confounding contribution from natural mortality. Mean CD4 percentages were higher in individuals with HIV-2 than in those with HIV-1 during early infection (28·0% [SE 1·3] vs 22·3% [1·7]; p=0·00094) and declined at a slower rate (0·4% [0·2] vs 0·9% [0·2] per year; p=0·028). HIV-2-infected individuals developed clinical AIDS at higher mean CD4 percentages (18·2%, IQR 7·2–25·4) than HIV-1-infected individuals (8·2%, 3·0–13·8; p<0·0001). Interpretation: Our results show that both HIV-1-infected and HIV-2-infected individuals have a high probability of developing and dying from AIDS without antiretroviral treatment. Funding: Swedish International Development Agency, Swedish Research Council, Swedish Society of Medical Research, Medical Faculty at Lund University, and Region Skåne Research and Development.