Objectives: Because current guidelines recognise high-grade anal squamous intraepithelial lesions (HSILs) and low-grade SILs (LSILs), and recommend treatment of all HSILs although not all progress to cancer, this study aims to distinguish transforming and productive HSILs by grading immunohistochemical (IHC) biomarkers p16INK 4a (p16) and E4 in low-risk human papillomavirus (lrHPV) and high-risk (hr)HPV-associated SILs as a potential basis for more selective treatment. Methods: Immunostaining for p16 and HPV E4 was performed and graded in 183 biopsies from 108 HIV-positive men who have sex with men. The causative HPV genotype of the worst lesion was identified using the HPV SPF10-PCR-DEIA-LiPA25 version 1 system, with laser capture microdissection for multiple infections. The worst lesions were scored for p16 (0–4) to identify activity of the hrHPV E7 gene, and panHPV E4 (0–2) to mark HPV production and life cycle completion. Results: There were 37 normal biopsies, 60 LSILs and 86 HSILs, with 85% of LSILs caused by lrHPV and 93% of HSILs by hrHPV. No normal biopsy showed E4, but 43% of LSILs and 37% of HSILs were E4 positive. No differences in E4 positivity rates were found between lrHPV and hrHPV lesions. Most of the lesions caused by lrHPV (90%) showed very extensive patchy p16 staining; p16 grade in HSILs was variable, with frequency of productive HPV infection dropping with increasing p16 grade. Conclusions: Combined p16/E4 IHC identifies productive and nonproductive HSILs associated with hrHPV within the group of HSILs defined by the Lower Anogenital Squamous Terminology recommendations. This opens the possibility of investigating selective treatment of advanced transforming HSILs caused by hrHPV, and a ‘wait and see’ policy for productive HSILs. What's already known about this topic?. For preventing anal cancer in high-risk populations, all patients with high-grade squamous intraepithelial lesions (HSILs) are treated, even though this group of lesions is heterogeneous, the histology is variable and regression is frequent. What does this study add?. By adding human papillomavirus (HPV) E4 immunohistochemistry to p16 INK4a (p16), and grading expression of both markers, different biomarker expression patterns that reflect the heterogeneity of HSILs can be identified. Moreover, p16/E4 staining can separate high-risk HPV-associated HSILs into productive and more advanced transforming lesions, providing a potential basis for selective treatment.