I think other civs take into consideration your defensive pacts.
Once the Inca have effectively conquered all their continent, with the Iroqouis being the only "resistance". I was alone with Arabia on my continent, and Arabia was getting ready for war. I could've wiped them out (AI, duh?) but I wasn't willing to fight. So I singed a defensive pact with the Iroqouis. The plan worked, and for 30 turns, the world was at peace.
And then!
The dp ended, and one single turn later, the Inca declare war on the Iroqouis. Apparently, the Inca were not willing to fight us both.
Moral: the AI takes into consideration your dp, even if they don't sign them, AND Harun will gladly build enough units to fill his entire territory and live with a -900 gpt economy.