World leaders, including rival Iran's foreign minister, poured into Riyadh to offer condolences on the death of Saudi Crown Prince Sultan bin Abdul Aziz who was buried on Tuesday in the presence of an ailing King Abdullah.
While his successor has yet to be named, the body of Sultan, who died on Saturday in a New York hospital, has been repatriated to Riyadh for the funeral.
It is the first time that the heir to the throne's seat stays vacant in the history of the OPEC kingpin, where the monarch's advanced age and health issues have raised concern in a country ruled by the Al-Saud family since 1932.
Ailing King Abdullah, 87, who arrived on a walker with a surgical mask on his face, remained seated as he took part in the funeral ceremony.
The monarch was hospitalised for a new back surgery in Riyadh earlier this month, following two similar operations last year in the United States.
Sultan's body was wrapped in a brown cloth and laid on the mosque ground as the mourners prayed for him. It was then taken out of the mosque to be buried in a nearby cemetery.
More than 100 world dignitaries have being gathering in the capital.
Ali Akbar Salehi, foreign minister of Shiite Iran, the Sunni conservative kingdom's arch foe, arrived for Sultan's funeral, the Saudi news agency SPA reported.
Tensions have risen between Iran and Saudi Arabia in the past two weeks, since US allegations surfaced that Iranian officials plotted to assassinate the Saudi ambassador to Washington.
Although Tehran has rubbished the accusations, Riyadh has taken them seriously and said it was pondering "a suitable response."
Even before the plot claims, ties between the two regional rivals were strained over Saudi Arabia's military assistance to Bahrain to put down pro-democracy protests by mostly Shiite demonstrators.
Signup to our newsletter and follow us on Facebook and Twitter!
From Egypt -- where protesters, backed by the army, ousted Saudi Arabia's ally Hosni Mubarak earlier this year -- military ruler Field Marshal Hussein Tantawi flew in for the funeral, Saudi state television Al-Ekhbariya reported.
It is Tantawi's first trip abroad since he took power in February with the downfall of president Mubarak.
Jordan's King Abdullah, whose government declared a day of mourning on Tuesday, also landed in Saudi Arabia, as well as Sudan's President Omar al-Bashir, wanted by the International Criminal Court.
Gulf leaders Sheikh Hamad bin Khalifa al-Thani of Qatar, Kuwait's Emir Sheikh Sabah al-Ahmad al-Sabah and Bahrain's King Hamad bin Issa al-Khalifa were all present in Riyadh for the funeral of Sultan.
SPA reported that Turkey's Deputy Prime Minister Bulent Arinc and Malaysian Prime Minister Najib Razak also joined the mourners in the Saudi capital.
US Vice President Joe Biden, Pakistani President Asif Ali Zardari were likewise among world leaders heading to the Saudi capital to offer condolences.
Syrian Vice President Faruq al-Sharaa arrived in Riyadh as the Saudi news agency SPA reported that London-based Rifaat al-Assad, exiled uncle of Syria's President Bashar al-Assad, had flown in.
Ties have soured between Saudi Arabia and Iran's ally Syria, where the United Nations says more than 3,000 people, mostly civilians, have been killed since mid-March in a crackdown on dissent.
King Abdullah on August 8 recalled the Saudi ambassador in Damascus for consultations and called on the Syrian authorities to "halt the death machine... before it's too late."
Sultan was the second deputy prime minister until the then crown prince Abdullah acceded to the throne in 2005.
Prince Nayef bin Abdul Aziz, a half-brother of King Abdullah and the kingdom's internal security czar who has held the interior portfolio for over three decades, is touted as the most likely heir to Sultan.
King Abdullah, who is also the prime minister, in 2009 appointed Prince Nayef, 78, as second deputy premier, in a move interpreted as putting him in line for the throne.