24The transition from unicellular to multicellular organisms is one of the most significant 25 events in the history of life. Key to this process is the emergence of Darwinian 26 individuality at the higher level: groups must become single entities capable of 27 reproduction for selection to shape their evolution 1-4 . Evolutionary transitions in 28 individuality are characterized by cooperation between the lower level entities 5-7 and by 29 division of labour 8,9 . Theory suggests that division of labour may drive the transition to 30 multicellularity by eliminating the trade-off between two incompatible processes that 31 cannot be performed simultaneously in one cell 1,9,10 . Here we examine the evolution of 32 the most ancient multicellular transition known today, that of cyanobacteria 11,12 . We 33 developed a novel approach for the precedence polarization of phenotypic traits that 34 employs gene phylogenies and does not require a species tree. Applying our procedure 35 to cyanobacterial genomes we reconstruct the chronology of ecological and phenotypic 36 trait evolution in cyanobacteria. Our results show that the prime driver of 37 multicellularity in cyanobacteria was the expansion in metabolic capacity offered by 38 nitrogen fixation, which was accompanied by the emergence of the filamentous 39 morphology and a reproductive life cycle. This was followed by a range of niche 40 expansions and interactions with other species, and the progression of multicellularity 41 into higher complexity in the form of differentiated cells and patterned multicellularity. 42 43