Move comes under heavy pressure from Saudi Arabia, UAE and other neighbours, with threat posed by Isis used as lever

Qatar has pledged to expel exiled leaders of Egypt's Muslim Brotherhood as one of the conditions of an agreement forced on the wealthy Gulf state by Saudi Arabia, the United Arab Emirates and other neighbours.

In a move that reflects shifting political alignments in a deeply divided Middle East, seven senior Brotherhood figures were ordered at the weekend to leave Doha, which is seen by the Egyptian government and its conservative Gulf backers as a centre of subversive Islamist activity. They include its acting leader, Mahmoud Hussein, and two other senior colleagues.

Qatar also agreed to stop attacking Egypt in al-Jazeera broadcasts. The TV network is based in Doha and is seen across the region as a reflecting the emirate's policies and preferences.

The conditions were part of an agreement signed in Riyadh in November 2013 and designed to patch up an angry quarrel in which Qatar was blamed for backing the Brotherhood in Egypt and Islamist groups from the neighbouring UAE to Libya. It has never been made public, and until recently had not been implemented.

Fears about the threat from Islamic State (Isis) in Iraq and Syria helped to convince Qatar to back down, diplomats said.

Turkish media reported that the country's president, Recep Tayep Erdoğan, had extended a welcome to the exiled leaders. Amr Darrag, the Brotherhoods's foreign relations officer, has already arrived in Turkey, according to al-Jazeera Turk. Gamal Abdul Sattar, the former deputy head of Egypt's religious affairs directorate, was planning to move to Istanbul, it said.

For the last four years Qatar and Turkey have been the chief backers of the Islamist movements that flourished during the Arab spring uprisings only to experience crushing defeat in Egypt when the Brotherhood's democratically-elected president Mohammed Morsi was overthrown by the army. Morsi's fall was openly supported by the other Gulf states and implicitly backed by the west. Under his successor, Abdel-Fatah al-Sisi, hundreds of Brotherhood supporters have been killed or imprisoned and the group has been outlawed as a terrorist organisation.

The departure of the Egyptian Brotherhood leaders from Doha was announced at the weekend and described as intended to spare Qatar embarrassment.

Details of the Riyadh deal, revealed by Gulf sources, underline the heavy pressure brought to bear. In March, in one of the worst spats the region has seen in recent years, Saudi Arabia, the UAE and Bahrain all withdrew their ambassadors from Doha. Kuwait and Oman, the other two members of the Gulf Co-operation Council (GCC), are less hawkish. Riyadh tried to impose new conditions, including the closure of US thinktanks based in Doha. "The Saudis wanted to go beyond the original agreement and dictate to the Qataris, and the Qataris said no," said a well-placed Arab source.

Palestinian sources denied reports on Tuesday that the Hamas leader, Khaled Meshal, had also been asked to leave Doha. Qatar has played an important role backing the group, which is linked to but distinct from the Muslim Brotherhood. Israel has attacked Qatar in recent weeks for its support for Hamas. Doha has also been under fire for alleged links with Isis, which it has flatly denied. Like Saudi Arabia, it backed Islamist groups in Syria, some of which morphed over time into Isis.

Pressure on Qatar to implement the Riyadh agreement peaked in late August, when the Saudi foreign minister, interior minister and intelligence chief visited Doha. On 6 September, Qatar was given one further week to begin implementation.

"The Qataris have been forced into a situation where they have had to step back," said Michael Stephens of the Doha office of the Royal United Services Institution. "They tried as best they could to maintain their foreign policy without interference from other parties, but they were always going to have to make some kind of compromise. I am only suprised it has taken so long.

"This is a big deal in terms of understanding the balance of power in the Gulf. There's definitely a sense that they have to give some ground, that they can't just be this maverick state with its fingers in so many pies in the region."

Qatar has signalled that it will continue to support the Brotherhood more discreetly, while backing Gulf-wide efforts to fight Isis.