—Nonparametric belief propagation (NBP) is one of the best-known methods for cooperative localization in sensor networks. It is capable to provide information about location estimation with appropriate uncertainty and to accommodate non-Gaussian distance measurement errors. However, the accuracy of NBP is questionable in loopy networks. In this paper, we propose a novel approach, NBP based on spanning trees (NBPST) created by breadth first search (BFS) method. According to our simulation results, NBP-ST performs better than NBP in terms of accuracy, computational and communication cost in the networks with high connectivity (i.e., highly loopy networks).