The cerebral cortex constructs a coherent representation of the world by integrating distinct features of the sensory environment. Although these features are processed vertically across cortical layers, horizontal projections interconnecting neighbouring cortical domains allow these features to be processed in a context-dependent manner. Despite the wealth of physiological and psychophysical studies addressing the function of horizontal projections, how they coordinate activity among cortical domains remains poorly understood. We addressed this question by selectively activating horizontal projection neurons in mouse somatosensory cortex, and determined how the resulting spatial pattern of excitation and inhibition affects cortical activity. We found that horizontal projections suppress superficial layers while simultaneously activating deeper cortical output layers. This layer-specific modulation does not result from a spatial separation of excitation and inhibition, but from a layer-specific ratio between these two opposing conductances. Through this mechanism, cortical domains exploit horizontal projections to compete for cortical space.