There were five kingdoms left in my game three of the AI's had dog piled on the weakest AI faction. The weaklings were down to their last city, they were surrounded on all sides and had no hope. I approached the richest of the three powerful nations and offered to join the remaining three or four turns of the war effort (I managed to get a single cavalry unit almost to the last city before it fell), in exchange for this move they were willing to trade me all of their treasury (around 800 guilders) and over 600 points of technology.
The AI should be a bit brighter about this sort of thing.