Both countries are strengthening ties at a time when their rivals in the region are forging closer alliances.