Recent experimental and theoretical results in cat primary visual cortex and in the whisker-barrel fields of rodent primary somatosensory cortex suggest common organizing principles for layer 4, the primary recipient of sensory input from the thalamus. Response tuning of layer 4 cells is largely determined by a local interplay of feed-forward excitation (directly from the thalamus) and inhibition (from layer 4 inhibitory interneurons driven by the thalamus). Feed-forward inhibition dominates excitation, inherits its tuning from the thalamic input, and sharpens the tuning of excitatory cells. Recurrent excitation enhances responses to effective stimuli.