Prem Tinsulanonda, who was an army commander, Prime Minister and advisor to the royal palace was one of Thailand's most influential political figures over four decades, died Sunday (local time) at age 98.
A statement from the palace said Prem died of heart failure at Bangkok's Phra Mongkutklao hospital, and had served the throne loyally, contributing beneficially to the country.
Prem was best known for his long-standing devotion to the monarchy, especially the late King Bhumibol Adulyadej, who appointed him to his Privy Council immediately after Prem's eight years as Prime Minister, and named him head of that powerful advisory body in 1998, a position he held until his death.
Prem is credited by scholars with establishing the unspoken primacy of the palace in Thailand's power structure, cementing a mutually beneficial alliance with the military.
"He essentially forged and sustained a partnership between monarchy and military with the latter as junior partner up until today," said Paul Chambers, a political scientist at Naraesuan University in northern Thailand.
Prem was Prime Minister from 1980 to 1988, and helped usher in a period of relative stability after a successful pro-democracy uprising against a military dictatorship in 1973, a counter-revolution and coup in 1976 and another coup in 1977, as well as edginess about communist takeovers in neighbouring Indochina in 1975.
Prem, in apparently vigorous health for his age until recently, looked frail at two recent public appearances: voting in the March general election and the formal coronation of Bhumibol's son, King Maha Vajiralongkorn, earlier this month.
Prime Minister Prayuth Chan-ocha, the junta leader who seized power in 2014, praised Prem as "a role model for Thais who love the country," according to a statement from deputy government spokesman Werachon Sukondhapatipak.
"He was honest and cared for the betterment of society. He also had other characteristics about him that future generations should learn from," the statement cited Prayuth, another former army commander, as saying.
A later government statement called Prem a "hero," and said that flags would be lowered to half-staff for seven days in his honour and that civil servants would dress appropriately for mourning for three weeks.
Never married, Prem leaves no family survivors. Thailand's Princess Sirindhorn will preside over his initial Buddhist funeral rites on Monday.