Quantum networks are composed of nodes that can send and receive quantum states by exchanging photons 1 . Their goal is to facilitate quantum communication between any nodes, something that can be used to send secret messages in a secure way 2,3 , and to communicate more efficiently than in classical networks 4 . These goals can be achieved, for instance, via teleportation 5 . Here we show that the design of efficient quantum-communication protocols in quantum networks involves intriguing quantum phenomena, depending both on the way the nodes are connected and on the entanglement between them. These phenomena can be used to design protocols that overcome the exponential decrease of signals with the number of nodes. We relate the problem of establishing maximally entangled states between nodes to classical percolation in statistical mechanics 6 , and demonstrate that phase transitions 7 can be used to optimize the operation of quantum networks.Quantum networks [8][9][10][11][12][13][14] , where different nodes are entangled, leading to quantum correlations that can be exploited by making local measurements at each node, will be the basis for the future of quantum communication. For instance, a set of quantum repeaters 10 can be considered as a simple quantum network where the goal is to establish quantum communication over long distances. To optimize the operation of such a network, it is required to establish efficient protocols of measurements in such a way that the probability of success in obtaining maximally entangled states between different nodes is maximized. This probability may behave very differently as a function of the number of nodes if we use different protocols: in some cases it may decay exponentially, something that makes the repeaters useless, whereas for some protocols it may decay only polynomially, something that would make them very efficient.A general network may be characterized by a quantum state, ρ, shared by the different nodes. The goal is then, given two nodes A and B, to find the measurements to be made at the nodes, assisted with classical communication, such that A and B share a maximally entangled state, or singlet, with maximal probability. We call this probability the singlet conversion probability (SCP). This, or other related quantities such as the localizable entanglement 15,16 , can be used as a figure of merit to characterize the state ρ and therefore the performance of the quantum network. Here, we focus on the SCP because of its operational meaning. These quantities cannot be determined in general, given that they require the optimization over all possible measurements in the different nodes, which is a formidable task even for small networks. consists of an arbitrary number of nodes in a given geometry sharing some quantum correlations, given by a global state ρ. b, Here we consider a simplified network where the nodes are disposed according to a well-defined geometry, for example the two-dimensional square lattice shown here, where each pair of nodes is connected by th...