To evaluate the prevalence of transmitted drug resistance (TDR) to nucleoside and nonnucleoside reverse transcriptase inhibitors (NRTI, NNRTI), protease inhibitors (PI), and integrase strand transfer inhibitors (INSTI) in Spain during the period 2019–2021, as well as to evaluate transmitted clinically relevant resistance (TCRR) to antiretroviral drugs. Reverse transcriptase (RT), protease (Pro), and Integrase (IN) sequences from 1824 PLWH (people living with HIV) were studied. To evaluate TDR we investigated the prevalence of surveillance drug resistance mutations (SDRM). To evaluate TCRR (any resistance level ≥ 3), and for HIV subtyping we used the Stanford v.9.4.1 HIVDB Algorithm and an in‐depth phylogenetic analysis. The prevalence of NRTI SDRMs was 3.8% (95% CI, 2.8%–4.6%), 6.1% (95% CI, 5.0%–7.3%) for NNRTI, 0.9% (95% CI, 0.5%–1.4%) for PI, and 0.2% (95% CI, 0.0%–0.9%) for INSTI. The prevalence of TCRR to NRTI was 2.1% (95% CI, 1.5%–2.9%), 11.8% for NNRTI, (95% CI, 10.3%–13.5%), 0.2% (95% CI, 0.1%–0.6%) for PI, and 2.5% (95% CI, 1.5%–4.1%) for INSTI. Most of the patients were infected by subtype B (79.8%), while the majority of non‐Bs were CRF02_AG (n = 109, 6%). The prevalence of INSTI and PI resistance in Spain during the period 2019–2021 is low, while NRTI resistance is moderate, and NNRTI resistance is the highest. Our results support the use of integrase inhibitors as first‐line treatment in Spain. Our findings highlight the importance of ongoing surveillance of TDR to antiretroviral drugs in PLWH particularly with regard to first‐line antiretroviral therapy.