Quoting Glazunov1, reply 5If Tarth has an alliance and good relations with other kingdoms, chances are she won't get attacked by them. And Empires would hesitate to attack her as well, because of the alliances. If you can bribe someone into attacking her, that might start a chain reaction.
I don't think that it is possible for (the human player) to maintain good relations with an AI to avoid being attacked if you power rating is low, so the same *should* apply to weak AI's as well.
A few games back I was second as Procipinee to Magnar, with Altair back quite a bit in third. Magnar really didn't like my sovereign, at all. But I formed alliances with two other kingdoms, and instead of attacking, he tried to form alliances with her, himself. He was also rated in the game as "aggressive." I can't absolutely conclude that alliances had anything to do with it, of course, but the only other point that I can think of is the AI being aware that attacking one kingdom (allied or not) would result in war by other kingdoms.