The United Arab Emirates' president Sheikh Khalifa bin Zayed Al-Nahyan died aged 73 on Friday, state media said, after battling illness for several years.
The president of the oil-rich Gulf state, who was rarely seen in public, is likely to be replaced by his brother, Abu Dhabi crown prince Mohammed bin Zayed, who was already seen as the UAE's de facto ruler.
"The Ministry of Presidential Affairs has mourned to the UAE people, Arab and Islamic nations and the world the death of President His Highness Sheikh Khalifa bin Zayed Al-Nahyan," the official WAM news agency tweeted.
The ministry announced 40 days of mourning, with flags at half-mast from Friday and work suspended in the public and private sector for the first three days.
Sheikh Khalifa took over as the UAE's second president in November 2004, succeeding his father as the 16th ruler of Abu Dhabi, the richest of the federation's seven emirates.
He has rarely been seen in public since 2014, when he had surgery following a stroke, although he has continued to issue rulings. The cause of death was not immediately released.
The UAE, a former British protectorate that was founded in 1971, has gone from desert outpost to booming state in its short history, fuelled by its oil wealth and Dubai's rise as a trading and financial centre.
The Arab world's second-biggest economy behind Saudi Arabia has also begun to wield growing political influence, filling a space ceded by traditional powers such as Egypt, Iraq and Syria.
The country of 10 million also joined military campaigns in Libya and Yemen and broke ranks with much of the Arab world to establish ties with Israel in 2020.
The bearded Sheikh Khalifa had cut a frail figure on his occasional public appearances, while his brother Mohammed bin Zayed hosted world leaders and led diplomatic forays abroad.
"The Emirates has lost its virtuous son and leader of the 'stage of empowerment' and the trustee of its blessed journey," Mohammed bin Zayed tweeted on Friday.
"His stances, achievements, wisdom, generosity and initiatives are in every corner of the nation.. Khalifa bin Zayed, my brother... may God have mercy on you and grant you access to paradise."
Sheikh Khalifa, who had no formal higher education, led the UAE as Dubai emerged as a tourism and trade hub and Abu Dhabi pumped oil as a key OPEC player.
He came to the rescue of Dubai when it was hit by the global financial crisis in 2009, extending a multi-billion-dollar lifeline to the debt-laden emirate.