In most animal phyla, nerve cells form highly specific connections with each other 1,2 . The resulting intricate networks determine what activity patterns a nervous system can sustain, and hence what behaviors an animal can exhibit 3,4 . Accordingly, understanding the relationship between connectivity and activity is a major goal of neuroscience. However, despite major recent advances 5,6 , no current technology can comprehensively record activity in large nervous systems such as the human or even the mouse brain, nor can connectivity be reconstructed at synaptic level in such systems 7 . Doing both at once in the same specimen remains a distant goal.However, smaller nervous systems offer exciting opportunities today, and here we report for the first time obtaining joint functional and anatomical data from a major functional unit of the nervous system of the medicinal leech, by combining voltage-sensitive dye (VSD) 8 imaging with serial blockface electron microscopy (SBEM) 9 . We simultaneously recorded from the majority of the neurons in a segmental ganglion during several motor behaviors with a VSD sufficiently sensitive to record subthreshold neuronal activity 10,11 . We then anatomically imaged the entire ganglion with SBEM 12 . As a proof of concept, we have manually traced a critical motor neuron and identified all of its numerous presynaptic partners. The thorough reconstruction of individual synapses in combination with functional data enabled a quantitative analysis that revealed spatial clustering of synapses from functionally synchronized cell assemblies. All of our data is publicly available.