We propose a fully distributed methodology based on factor graphs for joint cooperative localization and distributed noncooperative target tracking in a 3D scenario where multiple surveillance aircraft fly in formation without access to GNSS measurements or communication with anchor nodes. Our approach is based on the Adapt-then-Combine (ATC) diffusion scheme, which is integrated into the factor graph by the introduction of special combine factors to perform geometric average fusion of the target beliefs over a partially connected network. The updated target belief held by each aircraft following the combine step is also fed back to improve the aircraft’s own self-localization, assimilating the target measurements. Simulation results show that the proposed distributed algorithm performed close to the PCRLB of the optimal centralized solution and that the agents approached a consensus about the target state estimate.