The architecture of the primary visual cortex, the first cortical area devoted to processing visual information, exhibits fascinating spatial organization. Individual nerve cells in this area are strongly tuned to respond to specific orientations (edges, contours, line segments) in the visual field. The map of preferred orientation as a function of position in the cortical sheet shows a mixture of order and disorder on different spatial scales. The patterns observed experimentally show regions of smooth progression in preferred orientation interspersed with line and point singularities. A natural framework for studying the formation of these patterns is a variant of Heisenberg’s planar magnetic or XY model in which the Hamiltonian includes cooperative local interactions and longer range competitive interactions. Numerical Monte Carlo studies suggest a continuous phase transition in the model. The degree of local disorder in simulated maps just beyond the phase transition corresponds to that observed in single-unit cortical measurements, suggesting a possible connection between phase-transition–like behavior and the so-called “critical period” for development of these patterns in the maturing cortex.