Saudi King Abdullah bin Abdulaziz has died, royal officials have announced, weeks after he was admitted to hospital.
Abdullah, who had ruled since 2005 and was said to be aged about 90, had been suffering from a lung infection.
His 79-year-old half-brother, Salman, has been confirmed as the new king.
Within hours of his accession to the throne of the oil-rich kingdom, King Salman vowed to maintain the same policies as his predecessors.
"We will continue adhering to the correct policies which Saudi Arabia has followed since its establishment," he said in a speech broadcast on state television.
Abdullah had suffered frequent bouts of ill health in recent years, and King Salman had recently taken on the ailing monarch's responsibilities.
Prior to announcing Abdullah's death, Saudi television cut to Koranic verses, which often signifies the passing of a senior royal.
A statement said Abdullah had died at 01:00 (22:00 GMT Thursday).
At the scene: Sylvia Smith, BBC News, Jeddah
Here in Saudi Arabia's second city, the streets were quiet this morning as many people flocked to mosques for Friday prayers. There is a subdued sadness in the air as Saudis take in the loss of their king.
People throughout the kingdom are mourning a man whom many viewed as a good monarch. A Jedawi I spoke to said that although it was known that Abdullah was ailing, to wake up to news of the king's death was distressing. Another Jedawi referred to the loss as like a family member passing away.
It is only after the king is later laid to rest, that people here and in the kingdom at large can begin to adjust to his passing.
Another of the late king's half-brothers, Muqrin, who is in his late 60s, has been named the new crown prince, according to an official statement.
Abdullah, Salman and Muqrin are all sons of the founder of modern Saudi Arabia, King Abdulaziz, usually referred to as Ibn Saud, who died in 1953.
King Salman called on the royal family's Allegiance Council to recognise Muqrin as his heir. He swiftly appointed Interior Minister Prince Mohammed bin Nayef as deputy crown prince, making him second in line to the throne, and named his own son, Mohammed bin Salman, as defence minister.
Other ministers, including foreign, oil and finance were kept in place, state TV reported.
The new king's profile was updated on his official Twitter account, where he wrote: "I ask God to help me succeed in my service of the dear [Saudi] people."
In keeping with traditions of Wahhabism - the ultra-conservative form of Sunni Islam followed by the kingdom - King Abdullah will be buried in an unmarked grave immediately after Friday prayers.
The Saudi religious establishment views every aspect of life and death as a submission to God's supreme will, and protocol permits no official mourning period. Government offices stay open and flags remain at full mast.
Analysis: Frank Gardner, BBC security correspondent
Saudi Arabia under King Salman faces a number of challenges. The first is ensuring the succession passes smoothly without any divisive jockeying for power within the ruling family. Then there is the ongoing threat from jihadists, both at home and across its borders.
Saudi Arabia is now sandwiched between an aggressive Islamic State (IS) to the north and al-Qaeda in Yemen to the south. Saudi warplanes have joined the US-led coalition in air strikes against IS, but this is deeply unpopular with many Saudis.
The government has yet to find a way to cope with mild calls for reforms, and is abusing anti-terror laws to silence reformers and punish its critics. Longer term, it faces a growing unemployment problem. About half the population is under 25 and there are nowhere near enough meaningful jobs for young Saudis.
But the country does at least have oil in its favour. With prices below $45 a barrel, Saudi Arabia is one of the very few exporting countries to still make big margins on production and exploration. That puts it in a powerful position on the world stage.
US President Barack Obama expressed his personal sympathies, and those of the American people, on Abdullah's death.
"As a leader, he was always candid and had the courage of his convictions. One of those convictions was his steadfast and passionate belief in the importance of the US-Saudi relationship as a force for stability and security in the Middle East and beyond," he said.
Vice-President Joe Biden tweeted that he would lead a delegation to Riyadh to pay respects.
UK Prime Minister David Cameron said Abdullah would be remembered for his "commitment to peace and for strengthening understanding between faiths".
Jordan's King Abdullah II cut short a visit to Davos, Switzerland, to travel to Saudi Arabia, as Jordan's royal court declared 40 days of mourning.
Israeli President Reuven Rivlin praised Abdullah's "grounded, considered and responsible leadership", while Iran offered Saudi Arabia its condolences and said its foreign minister would travel to Riyadh for an "official ceremony" on Saturday.
When he came to the throne in 2005 he succeeded another half-brother, Fahd. However, he had already been Saudi Arabia's de-facto leader for 10 years because his predecessor had been debilitated by a stroke.
In recent months Abdullah's age and failing health had led to increasing focus on the issue of the Saudi royal succession.
The crown has traditionally passed between Ibn Saud's sons, but few are still alive.
King Salman's appointment of Mohammed bin Nayef - a grandson of Ibn Saud - as deputy crown prince effectively smoothes the line of succession for years to come.
Correspondents say Abdullah was seen as a reformer at home, albeit a slow and steady one.
He allowed mild criticism of his government in the press, and hinted that more women should be allowed to work.
King Salman spent 48 years as governor of Riyadh Province before becoming crown prince and defence minister.
BBC security correspondent Frank Gardner says it is thought unlikely that he will embark on any great changes.
In a recent meeting with the BBC in Jeddah, he appeared alert and well-briefed but walked with the aid of a stick, our correspondent adds.
- Born on 31 December 1935
- Son of Princess Hassa al-Sudairi
- Governor of Riyadh from 1955-1960 and 1963-2011
- Appointed defence minister upon death of his brother Crown Prince Sultan
- Owns important stake in one of the Arab world's largest media groups