OBJECTIVES The aim of the study was to assess the adequacy of initial antiretroviral therapy (ART), in terms of its timing and the choice of regimens, according to the Spanish national treatment guidelines [Spanish AIDS Study Group-National Plan for AIDS (GeSIDA-PNS) Guidelines] for treatment-naïve HIV-infected patients. METHODS A prospective cohort study of HIV-positive ART-naïve subjects attending 27 centres in Spain from 2004 to 2010 was carried out. Regimens were classified as recommended, alternative or nonrecommended according to the guidelines. Delayed start of treatment was defined as starting treatment later than 12 months after the patient had fulfilled the treatment criteria. Multivariate logistic and Cox regression analyses were performed. RESULTS A total of 6225 ART-naïve patients were included in the study. Of 4516 patients who started treatment, 91.5% started with a recommended or alternative treatment. The use of a nonrecommended treatment was associated with a CD4 count > 500 cells/μL [odds ratio (OR) 2.03; 95% confidence interval (CI) 1.14-3.59], hepatitis B (OR 2.23; 95% CI 1.50-3.33), treatment in a hospital with < 500 beds, and starting treatment in the years 2004-2006. Fourteen per cent of the patients had a delayed initiation of treatment. Delayed initiation of treatment was more likely in injecting drug users, patients with hepatitis C, patients with higher CD4 counts and during the years 2004-2006, and it was less likely in patients with viral loads > 5 log HIV-1 RNA copies/ml. The use of a nonrecommended regimen was significantly associated with mortality [hazard ratio (HR) 1.61; 95% CI 1.03-2.52; P = 0.035] and lack of virological response. CONCLUSIONS Compliance with the recommendations of Spanish national guidelines was high with respect to the timing and choice of initial ART. The use of nonrecommended regimens was associated with a lack of virological response and higher mortality.