BEIRUT - Islamic State militants are considered so great a threat to so many countries that former enemies are now essentially on the same team. But as alliances shift and countries re-define themselves, analysts say the long-standing goals of some key players in the Middle East may soon compete with Western goals. They also say this could ultimately threaten efforts to defeat Islamic State fighters.

In the fight against Islamic State militants, Gulf countries are emerging as military leaders, conducting airstrikes and hosting the bases used for the aerial campaign.

Gulf State Analytics founder Giorgio Cafiero says this is one of many ways the battle to re-claim lands in Iraq and Syria captured by IS is changing the Middle East.

“Mainly Saudi Arabia and the U.A.E. are stepping up their image as being real Middle Eastern military powers rather than their traditional roles of more cautious foreign policy,” he said.

But shifting roles have not entirely shifted alliances, and this could complicate the battle going forward, he says.

Saudi Arabia has long rivaled Iran and its allies, including Bashar Assad, the president of Syria whose forces have been battling rebel groups.

Officially, the U.S. also wants Mr. Assad to step down and has accused him of committing acts of terrorism against his own people. Both the U.S. and Saudi Arabia support rebel groups in Syria they call “moderate,” which means they are against President Assad and the Islamic State.

But Robert Blecher, the acting program director for the Middle East and North Africa at the International Crisis Group, says the official line is increasingly difficult for these rebels to believe, as U.S. led-forces attack Islamic State fighters with tacit approval from the regime.

“That’s their line," he said, "but it’s awfully hard to hold up that argument when you have rebels on the ground who are saying ‘Okay, if you want to support us, why aren’t you going after the regime?’”

And these rebel groups are expected to be on the front lines of any ground battle against IS, he says. U.S. support for President Assad - real or perceived - bcould push the groups away from the coalition.

The conundrum, says Cafiero, is that it may be impossible to end the civil war in Syria without the Assad regime, which despite all odds is still standing. And as long as the war in Syria continues, he says, Islamic State fighters will have space to operate, even if they are defeated in Iraq.

“It seems as though this is a rather endless conflict, which both the U.S. and Saudi Arabia are pushing for an outcome that seems rather unlikely, and again that outcome would be the simultaneous defeat of ISIS and Assad,” said Cafiero.

At the moment, Saudi Arabia remains steadfast in its opposition to the Assad regime but also committed to defeating the Islamic State first. There is also a glimmer of hope that the rivalry between Saudi Arabia and Iran is thawing, he says, as they quietly work together against the Islamic State.