Saudi Arabia's King Abdullah bin Abdulaziz has died at the age of 90, state television reported early on Friday and his brother Salman bin Abdulaziz Al Saud became king, it said in a statement attributed to Salman.
King Salman has called on the family's Allegiance Council to pay allegiance to Prince Muqrin bin Abdulaziz as his crown prince and heir.
"His Highness Salman bin Abdulaziz Al Saud and all members of the family and the nation mourn the Custodian of the Two Holy Mosques King Abdullah bin Abdulaziz, who passed away at exactly 1 am this morning," said the statement.
King Abdullah was admitted to the King Abdulaziz Medical City of the National Guard in Riyadh in December to undergo medical tests, according to state media.
The royal court earlier this month said that the king was suffering from pneumonia and had temporarily needed help to breathe through a tube, but that the procedure was successful.
He has also undergone surgery in the past few years related to a herniated disc.
State media have since repeatedly reported on members of the royal family visiting the hospital to gain reassurance about his health. His 79-year-old half-brother Salman has recently taken on the ailing Abdullah's responsibilities.
King Salman has been crown prince and defence minister since 2012. He was governor of Riyadh province for five decades before that.
By immediately appointing Muqrin as his heir, subject to the approval of a family Allegiance Council, Salman has moved to avert widespread speculation about the immediate path of the royal succession in the world's top oil exporter.
King Salman has been part of the ruling clique of princes for decades and is thought likely to continue the main thrusts of Saudi strategic policy, including maintaining the alliance with the United States and working towards energy market stability.
During his five decades as Riyadh governor he was reputedly adept at managing the delicate balance of clerical, tribal and princely interests that determine Saudi policy, while maintaining good relations with the West.
In the long term Saudi rulers have to manage the needs of a rapidly growing population plagued by structural unemployment, and an economy that remains overly dependent on oil revenue and undermined by lavish subsidies.
Saudi Arabia, which holds more than a fifth of the world's crude oil, also exerts some influence over the world's 1.6 billion Muslims through its guardianship of Mecca and Medina, Islam's holiest sites.
Most senior members of the ruling al-Saud family are thought to favor similar positions on foreign and energy policy, but incoming kings have traditionally chosen to appoint new ministers to head top ministries like oil and finance.
In a country where the big ministries are dominated by royals, successive kings have kept the oil portfolio reserved for commoners and insisted on maintaining substantial spare output capacity to help reduce market volatility.
The king who sought to modernize Saudi Arabia
King Abdullah, who took power in 2005 after the death of his half-brother King Fahd, was a powerful US ally who joined Washington's fight against al-Qaeda and sought to modernize the ultraconservative Muslim kingdom with incremental but significant reforms, including nudging open greater opportunities for women.
More than his guarded and hidebound predecessors, Abdullah assertively threw his oil-rich nation's weight behind trying to shape the Middle East. His priority was to counter the influence of rival, mainly Shiite Iran wherever it tried to make advances. He and fellow Sunni Arab monarchs also staunchly opposed the Middle East's wave of pro-democracy uprisings, seeing them as a threat to stability and their own rule.
He backed Sunni Muslim factions against Tehran's allies in several countries, but in Lebanon for example, the policy failed to stop Iranian-backed Hezbollah from gaining the upper hand. And Tehran and Riyadh's colliding ambitions stoked proxy conflicts around the region that enflamed Sunni-Shiite hatreds - most horrifically in Syria's civil war, where the two countries backed opposing sides. Those conflicts in turn hiked Sunni militancy that returned to threaten Saudi Arabia.
And while the king maintained the historically close alliance with Washington, there were frictions as he sought to put those relations on Saudi Arabia's terms. He was constantly frustrated by Washington's failure to broker a settlement to the Israel-Palestinian conflict. He also pushed the Obama administration to take a tougher stand against Iran and to more strongly back the mainly Sunni rebels fighting to overthrow Syrian President Bashar Assad.
Abdullah was born in Riyadh in 1924, one of the dozens of sons of Saudi Arabia's founder, King Abdul-Aziz Al Saud. Like all Abdul-Aziz's
Abdullah was selected as crown prince in 1982 on the day his half-brother Fahd ascended to the throne. The decision was challenged by a full brother of Fahd, Prince Sultan, who wanted the title for himself. But the family eventually closed ranks behind Abdullah to prevent splits.
Abdullah became de facto ruler in 1995 when a stroke incapacitated Fahd. Abdullah was believed to have long rankled at the closeness of the alliance with the United States, and as regent he pressed Washington to withdraw the troops it had deployed in the kingdom since the 1990 Iraqi invasion of Kuwait. The US finally did so in 2003.
When President George W. Bush came to office, Abdullah again showed his readiness to push against his US allies.
In 2000, Abdullah convinced the Arab League to approve an unprecedented offer that all Arab states would agree to peace with Israel if it withdrew from lands it captured in 1967. The next year, he sent his ambassador in Washington to tell the Bush administration that it was too unquestioningly biased in favor of Israel and that the kingdom would from now on pursue its own interests apart from Washington's. Alarmed by the prospect of a rift, Bush soon after advocated for the first time the creation of a Palestinian state alongside Israel.
The next month, the Sept. 11, 2001 terror attacks took place in the United States, and Abdullah had to steer the alliance through the resulting criticism. The kingdom was home to 15 of the 19 hijackers, and many pointed out that the baseline ideology for al-Qaeda and other groups stemmed from Saudi Arabia's Wahhabi interpretation of Islam.
When al-Qaeda militants in 2003 began a wave of violence in the kingdom aimed at toppling the monarchy, Abdullah cracked down hard. For the next three years, security forces battled militants, finally forcing them to flee to neighboring Yemen. There, they created a new al-Qaeda branch, and Saudi Arabia has played a behind-the-scenes role in fighting it.
The tougher line helped affirm Abdullah's commitment to fighting al-Qaeda. He paid two visits to Bush - in 2002 and 2005 - at his ranch in Crawford, Texas.
When Fahd died in 2005, Abdullah officially rose to the throne. He then began to more openly push his agenda.
His aim at home was to modernize the kingdom to face the future. One of the world's largest oil exporters, Saudi Arabia is fabulously wealthy, but there are deep disparities in wealth and a burgeoning youth population in need of jobs, housing and education. More than half the current population of 20 million is under the age of 25. For Abdullah, that meant building a more skilled workforce and opening up greater room for women to participate. He was a strong supporter of education, building universities at home and increasing scholarships abroad for Saudi students.
Abdullah for the first time gave women seats on the Shura Council, an unelected body that advises the king and government. He promised women would be able to vote and run in 2015 elections for municipal councils, the only elections held in the country. He appointed the first female deputy minister in a 2009. Two Saudi female athletes competed in the Olympics for the first time in 2012, and a small handful of women were granted licenses to work as lawyers during his rule.
One of his most ambitious projects was a Western-style university that bears his name, the King Abdullah University of Science and Technology, which opened in 2009. Men and women share classrooms and study together inside the campus, a major departure in a country where even small talk between the sexes in public can bring a warning from the morality police.
The changes seemed small from the outside but had a powerful resonance. Small splashes of variety opened in the kingdom - color and flash crept into the all-black abayas women must wear in public; state-run TV started playing music, forbidden for decades; book fairs opened their doors to women writers and some banned books.
But he treaded carefully in the face of the ultraconservative Wahhabi clerics who hold near total sway over society and, in return, give the Al Saud family's rule religious legitimacy.
Senior cleric Sheik Saleh al-Lihedan warned against changes that could snap the "thread between a leader and his people." In some cases, Abdullah pushed back: He fired one prominent government cleric who criticized the mixed-gender university. But the king balked at going too far too fast. For example, beyond allowing debate in newspapers, Abdullah did nothing to respond to demands to allow women to drive.
"He has presided over a country that has inched forward, either on its own or with his leadership," said Karen Elliot House, author of "On Saudi Arabia: Its People, Past, Religion, Fault Lines."
"I don't think he's had as much impact as one would hope on trying to create a more moderate version of Islam," she said. "To me, it has not taken inside the country as much as one would hope."
And any change was strictly on the royal family's terms. After the 2011 Arab Spring uprisings in particular, Saudi Arabia clamped down on any dissent. Riot police crushed street demonstrations by Saudi Arabia's Shiite minority. Dozens of activists were detained, many of them tried under a sweeping counterterrorism law by an anti-terrorism court Abdullah created. Authorities more closely monitored social media, where anger over corruption and unemployment - and jokes about the aging monarchy - are rife.
Regionally, perhaps Abdullah's biggest priority was to confront Iran, the Shiite powerhouse across the Gulf.
Worried about Tehran's nuclear program, Abdullah told the United States in 2008 to consider military action to "cut off the head of the snake" and prevent Iran from producing a nuclear weapon, according to a leaked US diplomatic memo.
In Lebanon, Abdullah backed Sunni allies against the Iranian-backed Shiite guerrilla group Hezbollah in a proxy conflict that flared repeatedly into potentially destabilizing violence. Saudi Arabia was also deeply opposed to longtime Iraqi Prime Minister Nouri al-Maliki, whom it considered a tool of Iran oppressing Iraq's Sunni Muslim minority.
In Syria, Abdullah stepped indirectly indirectly into the civil war that emerged after 2011. He supported and armed rebels battling to overthrow President Bashar Assad, Iran's top Arab ally, and pressed the Obama administration to do the same. Iran's allies Hezbollah and Iraqi Shiite militias rushed to back Assad, and the resulting conflict has left hundreds of thousands dead and driven millions of Syrians from their homes.
From the multiple conflicts, Sunni-Shiite hatreds around the region took on a life of their own, fueling Sunni militancy. Syria's war helped give birth to the Islamic State group, which burst out to take over large parts of Syria and Iraq. Fears of the growing militancy prompted Abdullah to commit Saudi airpower to a US-led coalition fighting the extremists.
Toby Matthiesen, author of "Sectarian Gulf: Bahrain, Saudi Arabia, and the Arab Spring That Wasn't," said Abdullah was not "particularly sectarian in a way that he hated Shiites for religious reasons. ... There are other senior members of the ruling family much more sectarian." But, he said, "Saudi Arabia plays a huge role in fueling sectarian conflict."
Abdullah had more than 30 children from around a dozen wives.