Introduction. Differential diagnosis of cutaneous manifestations of Kaposi sarcoma and bacillary angiomatosis in HIV-infected patients is particularly challenging in clinical practice. Routine histology may be inconclusive because of overlapping histological features. Materials and methods. We retrospectively analyzed 6 cases of Kaposi sarcoma and 2, of bacillary angiomatosis. Histological, immunohistochemical (HHV-8, CD31, CD34, ERG, and Ki-67), and molecular genetic studies, as well as transmission electron microscopy, were performed. Results. In Kaposi sarcoma, we observed a diffuse proliferation of spindle cells, slit-like vessels, and erythrocyte extravasation. Bacillary angiomatosis showed lobular capillary proliferation with large endothelial cells, neutrophilic infiltration, and necrosis. Immunohistochemistry revealed nuclear expression of HHV-8 only in Kaposi sarcoma, which was confirmed by polymerase chain reaction. Transmission electron microscopy demonstrated ultrastructural differences: Kaposi sarcoma was characterized by thin-walled vessels with a discontinuous basement membrane, absence of Weibel–Palade bodies, and presence of HHV-8 virion aggregates; in bacillary angiomatosis, we detected an intact basement membrane, Weibel–Palade bodies, extracellular bacteria, and neutrophilic infiltration. Conclusion. Immunohistochemical staining for HHV-8 is the most rapid primary method for confirming Kaposi sarcoma. When results are equivocal or polymerase chain reaction is unavailable, transmission electron microscopy may provide a useful diagnostic alternative by enabling direct visualization of viral particles or bacteria. The proposed algorithm improves diagnostic accuracy and facilitates timely administration of etiotropic therapy. Keywords: Kaposi sarcoma, bacillary angiomatosis, HIV-infected patients, differential diagnosis, immunohistochemistry, HHV-8, electron microscopy