The burrowing and feeding activities of fiddler and sesarmid crabs have considerable impacts on ecosystem functioning, accordingly they are considered ecosystem engineers. Identifying the factors influencing spatial and temporal variability in crab distribution and abundance would allow us to make predictions of their engineering impacts over a variety of habitats, which is essential for understanding the functionality of mangrove ecosystems. Here we determined the spatial and temporal distributions and abundances of fiddler crabs and sesarmids around canopy gaps in the mangroves of Darwin Harbour, Australia. We sampled three microhabitats at each canopy gap (site): gap center, gap edge and forest edge. We counted crabs and measured selected environmental variables at thirty sites stratified by height within two creek systems during a single season and at six sites within one creek system over two years. Fiddler crabs were generally more abundant in gap centers with Uca flammula preferring lower sites than Uca elegans or Uca signata, while sesarmids favored low to mid‐height vegetated sites. Canonical Correspondence analyses showed spatial abundances to be partitioned and the main driving factors were canopy density and site height, as well as substrate features (sediment mounds, soil moisture, soil penetrability, soil surface temperature). Temporal abundances were either highly variable (U. signata) or showed significant seasonal variation only at exposed (U. flammula) or higher (U. elegans) sites. The main factors driving temporal partitioning were humidity, wind speed, sunshine, and soil and air temperatures. Our results indicate that the distribution and abundance of crabs in mangroves varies over time and space, and with sampling scale. Substrate and environmental variables had been largely overlooked by previous studies describing the distribution and abundance of mangrove crabs. We, accordingly, suggest that studies designed to understand mangrove functionality include fine‐grained spatial and temporal assessments of ecosystem engineers.