Species loss or gain can change ecosystem functions according to the ecological context (e.g. assemblage composition, habitat heterogeneity and disturbance regime). We document how the suspension-feeder cockle Cerastoderma edule (L.) affects some properties of intertidal sediments during macrofauna recovery after deliberately induced anoxia. Forty adult cockles were transplanted to each of 12 plots (25 × 25 cm) in 3 physically homogeneous patches (4 × 4 m). Two patches had recolonised for 4 or 7 mo (DJ and DM, respectively) and had a very similar number of species (DJ: 4.5 ± 0.3 and DM: 5 ± 0.0). The other patch (C) was natural sediment with a relatively high species diversity (6.5 ± 0.6). Species composition was different among the 3 patches (DJ <DM <C) and indicated an increasing number of individuals and functional groups in accordance with the duration of the recovery period (DJ <DM <C). Changes in abundance of the resident macrofauna, in total benthic mineralization rates (oxygen uptake and carbon dioxide release) and in the exchange of inorganic nitrogen at the sediment–water interface were compared between transplanted and undisturbed plots. The functional response of the sediment ecosystem to the gain of C. edule varied among the patches. Following C. edule addition, ammonium release increased 3 to 4 times in the sediment which had been recolonising for 7 mo (DM), while uptake of nitrate decreased at similar levels in the other 2 patches (DJ and C). Effects were related to variations in the densities of 2 species, namely new recruits of the surface deposit-feeder Macoma balthica (≤5 mm) and the surface-detritivore and bioirrigator Hediste diversicolor. Cockles caused a decrease in the densities of M. balthica (≤5 mm) and an increase in those of H. diversicolor, mainly in DM. Cockles also modified how densities of these species and of Heteromastus filiformis correlated to sediment–water exchanges of ammonium and oxygen. C. edule also enhanced oxygen uptake at all sites, mainly due to its specific respiration rate. Variability in the functional response among patches of habitat (e.g. context-dependence) resulted as a consequence of biotic interactions between the cockles and the resident infauna.