Niccolò Machiavelli said this quote

A prince ought to have two fears one from within on account of his subjects the other from without on account of external powers. From the latter he is defended by being well armed and having good allies and if he is well armed he will have good friends and affairs will always remain quiet within when they are quiet without unless they should have been already disturbed by conspiracy and even should affairs outside be disturbed if he has carried out his preparations and has lived as I have said as long as he does not despair he will resist every attack.