Summary. We consider the problem of decentralized detection in a sensor network consisting of nodes arranged as a tree of bounded height. We characterize the optimal error exponent under a Neyman-Pearson formulation, and show that the Type II error probability decays exponentially with the number of nodes. Surprisingly, the optimal error exponent is often the same as that corresponding to a parallel configuration. We provide sufficient, as well as necessary, conditions for this to happen. We also consider the impact of failure-prone sensors or unreliable communications between sensors on the detection performance. Simple strategies that nearly achieve the asymptotically optimal performance in these cases are also developed.