Abstract-Macroinvertebrates were studied along a salinity gradient in the North Sea Canal, The Netherlands, to quantify the effect of trace metals (cadmium, copper, lead, zinc) on community composition. In addition, two methods for assessing metal bioavailability (normalizing metal concentrations on organic carbon and on the smallest sediment fraction) were compared. Factor analyses showed that normalizing trace metals resulted in an improved separation of trace metals from ecological factors (depth, organic carbon, granulometry, and chloride). The variation in the macroinvertebrate data was partitioned into four sources using partial canonical correspondence analysis, with the partitions being purely ecological factors, purely trace metals, mutual ecological factors and trace metals, and unexplained. Partial canonical correspondence analysis applied to total and normalized trace metal concentrations gave similar results in terms of unexplained variances. However, normalization on organic carbon resulted in the highest percentage of variation explained by purely ecological factors and purely trace metals. Accounting for bioavailability thus improves the identification of factors affecting the in situ community structure. Ecological factors explained 45.4% and trace metals 8.6% of the variation in the macroinvertebrate community composition in the ecosystem of the North Sea Canal. These contributions were significant, and it is concluded that trace metals significantly affected the community composition in an environment with multiple stressors. Variance partitioning is recommended for incorporation in further risk assessment studies.