Qatar's outgoing emir wanted to abdicate while he was still able to help his 33-year-old heir consolidate his authority, so ensuring minimal discord inside a family with a long record of palace intrigue.
While no one other than outgoing emir Sheik Hamad bin Khalifa al-Thani can know his full motivations, foremost among them appears to have been a need for stability in a dynasty that has ruled for more than 130 years.
That is the picture of last week's abdication that emerges from diplomats and others familiar with a country that during his rule rose from obscurity and relative poverty to global prominence in finance, diplomacy, sport and media.
Under the long planned handover, rare in a region where rulers usually die in office, Sheik Hamad, 61, stepped down following 18 years in office and made way for his son, Sheik Tamim bin Hamad al-Thani.
Sheik Hamad, a forceful, independent-minded personality who now takes the title “Father Emir”, explained in an abdication speech that he wanted a new generation “with their innovative ideas and active energies” to take over.
Left unspoken were other, related priorities.
The outgoing ruler has had kidney problems, and while the condition was not the reason for his decision, diplomats said, his continued ability to master Qatar's complex dynastic politics will have been a factor in his thinking.
Hamad's need for a smooth succession appears to have been shaped by an awareness of volatile al-Thani family history. He himself took power in a coup, as did the man - his own father - that he ousted.
As a result, Sheik Hamad will have wanted to arrange matters so that he has maximum time to steer his son's early months in office and help him deepen his own power base.
Shibley Telhami, a Middle East expert at the Unversity of Maryland said his abdication, carried out at a time when Qatar was “thriving, moves the country into the hands of a new generation with minimal dissent, while giving his son a golden chance to bolster his own legitimacy and credentials.”
Jane Kinninmont, a Gulf Arab expert at Britain's Chatham House think tank, said: “In a country with no tradition of smooth successions, leaving now allows the father to help oversee his son's succession, and help him build up his support base within the ruling family.”
“Emir Hamad left on a high note ... He clearly has a sense of history and drama,” she added.
Sheik Hamad's earlier experience of power was turbulent and marked by continual tensions over control of state finances.
He became effective ruler in 1992 when his father, Sheik Khalifa, allowed him to appoint a cabinet of his own choice and left him to run Qatar's day-to-day affairs, although his father kept ultimate power by retaining financial control.
But they fell out in early 1995 when Sheik Khalifa apparently tried unsuccessfully to claw back some of his previous authority and to resume control of the economy.
Later that year Sheik Hamad ousted his father in a bloodless coup. In early 1996 he survived a coup attempt that analysts attributed to his father, who had come to power in a similar palace takeover in 1972 when he ousted his cousin.
Fears of a possible repeat of the 1996 attempt continued to overshadow the country for several more years.
The former emir's priority now appears to be to help Sheik Tamim stamp his own mark on the state unbeholden to any powerful personality such as his own key lieutenant, Sheik Hamad bin Jassim, Qatar's top diplomat.
Sheik Hamad bin Jassim lost his jobs as prime minister and foreign minister in Sheik Tamim's first cabinet reshuffle, in what some diplomats saw as a long-planned step by the “Father Emir” to remove a potential rival to the young emir's authority.
Analysts familiar with the country said the outgoing emir wanted his son to have something he had never enjoyed - the experience of wielding office without the handicap of feeling obligated to others.
In his own case, Sheik Hamad had placed considerable reliance on Hamad bin Jassim al-Thani, the then foreign minister who helped his 1995 takeover by building support for the move amongst major Qatari families and contacts.
“HBJ”, as he is known, went on to turn the country's gas export earnings into investment holdings with global clout, an achievement that provided the emir with the economic muscle to back his activist regional diplomacy.
New emir has no political debts
“Tamim starts without being in debt to anyone,” said Saad Djebbar, an Algerian lawyer who knows Qatar well.
“Hbj [Hamad bin Jassim] was very good at business. He was kept busy. He knew how to deliver a deal. His strength was that he knew everyone and had a network. He provided money at a time when the emir didn't have much,” he said. “Now, the new emir comes without any baggage. And he has plenty of money. He has no constraints. The old emir will still have a vision and power. He will stand behind the [new] emir. And he believes that the vision will guide his son.”
Hamad Bin Jassim was dropped from both his ministerial positions, and late on Tuesday evening he also lost his post as vice chairman of the Qatar Investment Authority, according to an official announcement.
His departure from the cabinet has stirred speculation that recent setbacks by Syrian rebels armed by Qatar were the real reason for the abdication. Rebels backed by Qatar and other Gulf Arab states have suffered reversals on the battlefield at the hands of President Bashar al-Assad's forces.
Qatar's policy of arming Syrian rebels is viewed with unease by some other Gulf Arab states.
But the abdication was planned at least two years ago, if not even earlier, people who know Qatar well say.