It was a pretty loose alliance. They had some common enemies, and needed more allies. I think both nations had plans on fighting the other in the end.