SOFIA, Bulgaria (AP) - Patriarch Maxim of Bulgaria, who weathered a revolt over his communist-era ties to lead the Balkan country's Orthodox Christians for more than 40 years, has died. He was 98.

The patriarch died of heart failure early Tuesday at a Sofia hospital where he had been for a month, the Holy Synod said in a statement.

The Holy Synod of 13 senior clergy will meet to make funeral arrangements and choose an interim patriarch until a larger Church Council is held within the next four months to pick Maxim's successor, church officials said.

Orthodox Christianity is Bulgaria's dominant religion, followed by more than 80 percent of the country's 7.4 million people. Maxim was the church's leader for more than four decades, bridging the country's transition from communism and withstanding efforts to oust him by the new democratic government and rebel priests who saw him as a communist stooge.

Born on Oct. 29, 1914 as Marin Naideno v Minkov, he graduated from the Sofia Seminary in 1935 and entered Sofia University's theology department in 1938, before rising through the church ranks to be named Patriarch on July 4, 1971.

After the collapse of communism in 1989, the new democratic government sought to replace communist-appointed figureheads, including the patriarch, but because of the division between church and state such a decision could only be made by the church. It split between supporters of Patriarch Maxim and breakaway clergymen, who attempted to oust him and then formed their own synod.

The division plunged the church into turmoil, with occupations of key church buildings; priests breaking into fistfights on church steps; and water cannons and tear gas being turned on rebel bishops to clear the main Alexander Nevski cathedral.

For more than a decade, the two synods existed side by side, with the dissidents claiming to have rallied 30 percent of the country's 1,000 priests to th eir cause. The majority of believers stayed loyal to Maxim, who was recognized as legitimate by the church's other patriarchates.

The schism ended in 2010, when the head of the alternative synod, Metropolitan Inokentii, called for a healing of division between the groups and the rival synod was dissolved.

A panel reviewing communist-era collaborators with the former security services found no links to Maxim, though it said that 11 out of the country's 15 bishops had been working with the communist regime.

The church leader largely kept away from political life, though he remained an influential figure throughout his career.

He was hailed for meeting with Pope John Paul II during the pontiff's visit to Sofia in 2002, a trip seen as warming the frosty relationship between the Orthodox Church and the Vatican.

He also rallied support among his Orthodox colleagues in other countries for the release of six Bulgarian medics sentenced to death by the Gad hafi regime in Libya for allegedly deliberately infecting children with HIV.