RIYADH, Saudi Arabia — In a barnstorming tour that took him to eight countries in one week, Secretary of State Mike Pompeo burned with one central message: “The need to counter the greatest threat of all in the Middle East, the Iranian regime and its campaigns of terrorism and destruction,” as he put it in Cairo on Thursday.

Jetting from capital to capital, meeting with kings, princes and presidents, his goal was to get Arab countries to work together to roll back Iranian influence in the region and take on the militias Iran is backing.

But as the trip drew to a close on Monday, it was unclear whether he had made any notable progress on that front. The obstacles toward building such a coalition are formidable.

In practice, it will be difficult for the Arab nations to work closely together on anti-Iran policies because of the complexity of relationships in the region, officials and analysts from those countries say. The Iranian-backed militias Mr. Pompeo wants to rein in vary widely and would resist a one-size-fits all solution: Hezbollah is a major force in the government of Lebanon, the groups in Syria work mostly apart from one another in the war zone, and those in Iraq have great influence in the oil-rich south.