The defence deal between the two countries fits into a larger shift in regional alliances amid the US-Israel war on Iran.