Understanding the origin, nature and functional significance of complex patterns of neural activity, as recorded by diverse electrophysiological and neuroimaging techniques, is a central challenge in Neuroscience. Such patterns include collective oscillations, emerging out of neural synchronization, as well as highly-heterogeneous outbursts of activity interspersed by periods of quiescence, called "neuronal avalanches". Much debate has been generated about the possible scale-invariance or criticality of such avalanches, and its relevance for brain function. Aimed at shedding light onto this, here we analyze the large-scale collective properties of the cortex by using a mesoscopic approach, following the principle of parsimony of Landau-Ginzburg. Our model is similar to that of Wilson-Cowan for neural dynamics but, crucially, including stochasticity and space; synaptic plasticity and inhibition are considered as possible regulatory mechanisms. Detailed analyses uncover a phase diagram including down-states, synchronous, asynchronous, and up-state phases, and reveal that empirical findings for neuronal avalanches are consistently reproduced by tuning our model to the edge of synchronization. This reveals that the putative criticality of cortical dynamics does not correspond to a quiescent-to-active phase transition, as usually assumed in theoretical approaches, but to a synchronization phase transition, at which incipient oscillations and scalefree avalanches coexist. Furthermore, our model also accounts for up and down states as they occur, e.g. during deep sleep. The present approach constitutes a framework to rationalize the possible collective phases and phase transitions of cortical networks in simple terms, thus helping shed light into basic aspects of brain functioning from a very broad perspective.Cortical dynamics | Neuronal avalanches | Criticality | Synaptic plasticity T he cerebral cortex exhibits spontaneous activity even in the absence of any task or external stimuli (1-3). A salient aspect of this, so-called, resting-state dynamics, as revealed by in vivo and in vitro measurements, is that it exhibits outbursts of electrochemical activity, characterized by brief episodes of coherence -during which many neurons fire within a narrow time window-interspaced by periods of relative quiescence, giving rise to collective oscillatory rhythms (4, 5). Shedding light on the origin, nature, and functional meaning of such an intricate dynamics is a fundamental challenge in Neuroscience (6).Upon experimentally enhancing the spatio-temporal resolution of activity recordings, Beggs and Plenz made the remarkable finding that, actually, synchronized outbursts of neural activity could be decomposed into complex spatio-temporal patterns, thereon named "neuronal avalanches" (7). The sizes and durations of such avalanches were reported to be distributed as power-laws, i.e. to be organized in a scale-free way, limited only by network size (7). Furthermore, they obey finite-size scaling (8), a trademark of scale invariance...