The emir of Qatar has named his younger son, Prince Tamim, as crown prince, to replace his other son as heir apparent.
Sheik Hamad overthrew his own father in 1995
A court statement said Crown Prince Jassim bin Hamad bin Khalifa Al Thani, 25, would be replaced by Prince Tamim, 24.
No reason was given for the surprise move in the conservative Gulf sheikhdom.
Diplomats say Prince Jassim - who was head of Qatar's Environment and Protectorates Authority - had asked to be granted wider powers by the emir, Sheikh Hamad bin Khalifa Al Thani.
Prince Tamim - who graduated from the Royal Military Academy at Sandhurst in the UK - had complained of being sidelined in the running of the oil-and-gas rich country, diplomats said.
Qatar possesses the world's third largest natural gas reserves and its small population has one the highest per capita incomes of any country.
A key US ally in the region, Qatar hosted the advanced headquarters of the American forces during the US-led invasion of Iraq.
The Al Thani family dominates the political scene in the capital Doha, but there is a history of palace intrigue since the state gained independence from Britain in 1971.
Correspondents say the 1995 coup that brought Sheikh Hamad to power was sparked by a power struggle with his own father, Sheikh Khalifa.
The father had been attempting to recover powers and patronage that had been steadily secured and exercised by Sheikh Hamad in the preceding years, correspondents say.
The Al Thani rulers fund the controversial Doha-based television news channel, al-Jazeera.
Washington has accused the channel of bias in its coverage of Iraq, but it has a loyal audience across the Arab world and abroad.