A new decoder for the surface code that combines the accuracy of tensor-network decoders with the efficiency and parallelism of the belief-propagation algorithm.