The statistical analyses were performed using the SPSS 25.0 software and the STATA 16.0 software packages. Continuous variables were described as means ± standard deviation or medians with interquartile ranges, depending on the normality test. Categorical variables were represented as numbers (n) with percentages (%). The baseline characteristics and the biochemical parameters were compared using the Student’s t-test for normally distributed continuous variables, Mann–Whitney U-test for non-normally distributed continuous variables and the chi-square test for the categorical variables. Multivariable logistic regression analysis was performed to determine the relationship between obesity indices (per SD increase) and MAFLD. Adjusted odds ratios (ORs) were presented with 95% confidence intervals (CIs). Restricted cubic spline regression analysis was performed to estimate the association between multivariable-adjusted obesity indices and MAFLD in the lean and overweight/obese subjects and the knots were placed at the 5th, 35th, 65th, and 95th percentiles. Receiver operating characteristic (ROC) curves and area under the curve (AUC) values were used to compare the diagnostic values of the obesity indices for predicting the risk of MAFLD. A two-tailed P-value <0.05 was considered statistically significant.