1. Stones along the shore of a eutrophic English lake in summer have one of two epilithic assemblages. Many stones are covered with dense filaments of the macro-alga Cladophora glomerata and the tubes of detritivorous/browsing chironomids, Others have few algal filaments and are dominated by gallery-building caddis larvae (Tinodes waeneri). These communities are patchily distributed along the shore, macro-algae dominating in areas away from riparian trees and on tall, rather than flat stones. The origins of this dichotomy were assessed in a field experiment that provided new surfaces for colonization, according to a planned schedule in time and space.2. To examine temporal heterogeneity, artificial substrata (clay tiles) were introduced into the littoral each month from February to October 1995 and harvested on several occasions from 1 to 9 months later. 'Large' scale spatial heterogeneity was investigated by introducing tiles into three locations along the shore that differed with respect to shoreline trees. At a smaller scale, tiles were introduced with varying degrees of accessibility to dispersing insect larvae by placing them directly on the lake bed, above the bed on platforms, or as stacks of several tiles (to mimic tall stones).3. There was a distinct temporal separation in the colonization of invertebrates, with tube-building chironomid larvae dominating substrata in spring, before being displaced by Tinodes in summer. A strong temporal pattern in algal productivity, with spring and autumn maxima and a summer minimum, was attributable to nutrient limitation in summer.4. In summer, there was a strong spatial separation of organisms at large and small scales. In patches under or near trees, chironomids and Cladophora were replaced by Tinodes larvae. Cladophora remained abundant away from trees, where tiles were never colonized by the crawling Tinodes larvae, originating from egg masses laid beneath trees. Areas distant from oviposition sites may act as a grazing refugium for Cladophora and its associated chironomids. At a smaller scale, the inability of Tinodes to colonize the upper surfaces of tall stones also created spatial refugia for algae and chironomids, even within patches of generally high Tinodes density.5. There was also evidence of a temporal grazing refugium for Cladophora. Cladophora filaments which colonized tiles introduced in April subsequently resisted grazing by Tinodes newly recruiting in June. Filaments colonizing tiles introduced before or after April, however, were vulnerable to Tinodes. The precise mechanism for this is unclear, however.6. Spatiotemporal patterns in the epilithic community were caused by the external factors of a seasonally fluctuating nutrient supply and a patchy riparian strip of trees and the intrinsic factors of habitat choice, and the life history phenology of the organisms concerned. Our results infer strong direct biotic interactions among species( particularly grazing of Cladophora by Tinodes), indirect interactions between Tinodes and several chironomids via habitat engineering (i.e. the removal of Cladophora as chironomid habitat) and the crucial role of spatiotemporal heterogeneity in decoupling those interactions.