Abstract. Hilmi E, Sanjayasari D, Pereira O, Hartoyo, Haryono FED, Cahyo TN, Amron A, Junaidi T, Fikriyya N, Yusof KMKK. 2025. Assessing mangrove density and distribution related to petroleum hydrocarbon contamination in Segara Anakan Lagoon, Cilacap, Indonesia. Biodiversitas 26: 6074-6088. Total Petroleum Hydrocarbons (TPHs) are hazardous oil pollutant that has negative impact on mangrove ecosystem. In contaminated area, mangrove species might develop mechanism to reduce, accumulate, and transfer TPHs contaminants, yet this might affect their growth. This study aimed to analyze the relationship between TPHs with mangrove density and distribution based on the varying levels of TPHs in Segara Anakan Lagoon, Cilacap, Central Java, Indonesia. The research employed principal component analysis, utilizing the variables of water and soil TPHs, leaf TPHs, stem TPHs, root TPHs, number of species, species density, temperature, water salinity, pH, and TDS across seven research stations. The results showed that mangrove density ranged from 603-1295 trees ha-1 (low density). The potential TPHs were between 0.01-0.06% in water and 2.5-8.34% in sediment. The correlation between TPHs in water and the number of species was 0.844 (strong correlation), and with mangrove density was -0.083 (weak correlation). The correlation between TPHs in sediment and the number of species was 0.852 (strong correlation) and with density was -0.248 (weak correlation). The clustering analysis of mangrove stations revealed four clusters representing varying levels of contaminated areas. In addition, the clustering analysis of mangrove species revealed four groups representing different adaptation. This study found several dominant species which have high ability to live and grow in the TPHs contaminant areas including Sonneratia caseolaris, Ceriops tagal, Rhizophora apiculata, Bruguiera gymnorhiza, Xylocarpus granatum, Avicennia marina, Rhizophora stylosa, and Rhizophora mucronata. Such species are recommended to support mangrove rehabilitation in TPHs contaminated areas.