BANGKOK (AP) — Thailand’s Supreme Patriarch, who headed the country’s order of Buddhist monks for more than two decades, died Thursday. He was 100.

Doctors said that Somdet Phra Nyanasamvara (SOM-ded PRA YA-na-SUNG-WORN) died at Chulalongkorn Memorial Hospital in Bangkok, where he had been treated since being admitted for an illness more than a decade ago.

"(The Supreme Patriarch’s) overall condition deteriorated and he passed away at 7:30 p.m. from septicemia," or a severe blood infection, the doctors said in a statement.

After he was admitted to the hospital on Feb. 20, 2002, the Supreme Patriarch was able to perform leadership duties for a time, but in 2004, a senior Buddhist monk was appointed to work on his behalf. That monk died earlier this year, raising speculation about who the Supreme Patriarch’s successor will be.

His successor will be formally appointed by Thailand’s King Bhumibol Adulyadej.

Thailand is the world’s most heavily Buddhist country, with more than 90 percent of its 67 million people members of the religion. As the head of the religion, the patriarch has legal authority to oversee different sects of Buddhism.

The Supreme Patriarch promotes Buddhism and leads the Sangha Supreme Council, which oversees the country’s Buddhist monks and novices of all sects. The council’s job is to make sure monks follow Buddha’s teachings and do not violate the rules set by the council.

The Supreme Patriarch was a friend of His Holiness Dalai Lama of Tibet, who called the Thai monk "my elder brother." The Dalai Lama paid several visits to Thailand since his first state visit in 1967, and each time he would visit the temple where the Supreme Patriarch resided to have a discussion.

The Supreme Patriarch was born Charoen Gajavatra on Oct. 3, 1913, in Thailand’s western province of Kanchanaburi, the eldest of the three sons. He was still a boy when his father died, and was raised by his aunt.

He became gravely ill as a boy, and his family made a promise to sacred spirits that he would become a monk if he recovered. He did, and he became a novice when he turned 14.

The future Supreme Patriarch moved to Bangkok in 1929 to a well-respected Buddhist temple to continue his religious studies.

He returned briefly to his hometown to get ordained and became a monk in 1933. He was named Suvaddhano — "one who prospers well" — by the Supreme Patriarch of the time, and rose through the ranks of the monkhood. In 1956, when King Bhumibol spent 15 days as an ordained monk, the future patriarch taught and supervised him.

He served as secretary of the Supreme Patriarch who preceded him, and was appointed the top Buddhist monk in 1989, when he took on the name Somdet Phra Nyanasamvara — "a person of great insight."

The permanent secretary of the Prime Minister’s Office, Thongthong Chandrangsu, said government offices in Thailand will fly the national flag at half-staff for three days and government officials will be asked to wear black outfits for 15 days to mourn the Supreme Patriarch’s death.