Qatar crisis explained: As Gulf states end rift, how did we get here?
The crisis has seen Qatar blockaded by neighbours Saudi Arabia, the UAE and Bahrain, along with Egypt, since 5 June 2017 after accusations - strongly denied by Doha - that it supports extremist groups and being too close to Iran.
Saudi Arabia on Tuesday began to ease its land, air and sea restrictions on Qatar and it is expected that other countries in the quartet will follow suit.
The Gulf Cooperation Council (GCC) summit in the northwest Saudi city on Tuesday was be the stage that the resolution to the three-year crisis was announced.
The Gulf has been an arena of many alliances and rivalries over the decades, but the establishment of the GCC in 1981 helped unify the bloc due to threats in the region from a war between Baghdad and Tehran, and the Islamic Revolution in Iran.
The GCC endured the many crises to hit the region, including the 1990-91 Gulf War, the US invasion and occupation of Iraq in 2003, and ongoing tensions with neighbouring Iran.
Perhaps most significant for Gulf monarchies was the wave of pro-democracy uprisings that swept through the region from 2010, which Qatar-affiliated media was sympathetic to.
A 2013 Gulf agreement sought a common response among GCC members to the Arab Spring, which saw regimes toppled in Egypt, Tunisia and Libya.
Things came to a head in 2014 when Saudi Arabia, the UAE, and Bahrain withdrew their ambassadors from Qatar, accusing Doha of not sufficiently abiding to the GCC "security and stability" plan for the region.
Although the ambassadors eventually returned to Doha in November, tensions remained present.
This culminated in a blockade on Qatar by Saudi Arabia, the UAE, Bahrain and Egypt on 5 June 2017, which saw land, sea and air links to cut to Doha by the quartet. Many believed the blockading countries were emboldened by Donald Trump's arrival in the White House and lack of interest in maintaining Washington's traditional approach to foreign policy in favour of a transactional approach.
The four countries accused Qatar of sponsoring extremist groups and being too close to Iran, which Doha strongly denies. To many observers, the real target was Qatar's independent foreign policy.
With its only land border (with Saudi Arabia) closed and its neighbours cutting Qatar's access to airspace and waters, Doha had to find alternative suppliers.
Oman and Turkey increased shipping and freight flights - including food and medicine - to Doha, the latter having already established a military base in the Gulf state.
The quarter gave Qatar ten days to comply to a list of 13 demands, which included cutting ties with Iran, closing media outlets such as Al Jazeera, and severing allies ties to political movement the Muslim Brotherhood.
Qatari residents in the quartet states were also expelled, causing heartbreak for many mixed nationality families in the Gulf.
Qatar, Saudi Arabia, the UAE, Bahrain, and Egypt also engaged in lengthy legal battles in UN courts and other international organisations such as the International Court of Justice.
In 2020, Donald Trump's defeat to Joe Biden in US presidential elections saw a new urgency in the White House to resolving the crisis.
Trump's senior advisor and son-in-law Jared Kushner has played a key role in recent efforts to end the rift, shuttling between Gulf capitals to find common ground between the rivals.
Kuwait, a key broker in talks between the various countries in December, expressed hope that the crisis could be resolved soon, particularly after rare signs of dialogue between Qatar and Saudi Arabia.
The 5 January GCC summit in Saudi Arabia was viewed as the perfect time to announce an agreement after weeks of talks.
On the eve of the summit, Kuwait Foreign Minister Ahmad Nasser Al-Sabah announced that Saudi Arabia would re-open its borders with Qatar, effectively ending the kingdom's blockade on its neighbour.
On Tuesday morning, vehicles were technically permitted to use Qatar's only land border with Saudi Arabia for the first time in three years, hours before Gulf leaders met in Al-Ula for the GCC summit.
After embraces and warm words, Saudi Arabia's Crown Prince Mohammed bin Salman announced on Tuesday afternoon that Gulf leaders had signed an agreement resolving the crisis.
Although the exact details of the reconciliation deal are yet to be revealed, and what concessions could have been made by the parties, it marks a major turning point in relations between the six GCC members amid a period of fresh challenges - such as low oil prices - and a new era in American politics under President-elect Joe Biden, who is determined to reset relations with Iran, the geopolitical rival of many Arab Gulf states.