The Buddha taught the Vajjians the seven conditions that lead to no decline, so King Ajatasattu couldn't destroy them in war (Digha Nikaya 16)
"I have heard that on one occasion the Blessed One was staying near Rājagaha on Vulture Peak Mountain. And on that occasion, Ajātasattu Vedehiputta, the king of Magadha, wanted to attack the Vajjians. He said: “I will cut down these Vajjians — so mighty, so powerful! I will destroy these Vajjians! I will bring these Vajjians to ruin — these Vajjians!” Then he addressed Vassakāra the brahman, the chief minister of Magadha: “Come, brahman. Go to the Blessed One and, on arrival, show reverence with your head to his feet in my name and ask whether he is free from illness & affliction, is carefree, strong, & living in comfort, (saying,) ‘Ajātasattu Vedehiputta, the king of Magadha, lord, shows reverence with his head to the Blessed One’s feet and asks whether you are free from illness & affliction, are carefree, strong, & living in comfort.’ And then say: ‘Lord, Ajātasattu Vedehiputta, the king of Magadha, wants to attack the Vajjians. He says: “I will cut down these Va...