* Ailing Ovadia Yosef dies at age 93
* Baghdad-born rabbi was political kingmaker in Israel
* Founded Shas party, once a linchpin in Israeli governments
* Critics dubbed him 'Israel's ayatollah' and a racist
Some 700,000 mourners turned out on Monday for the funeral of Rabbi Ovadia Yosef, an Iraqi-born sage who transformed an Israeli underclass of Sephardic Jews of Middle East heritage into a powerful political force.
Police spokesman Micky Rosenfeld said that the funeral for Yosef, who died on Monday aged 93, was the biggest ever held in the holy city.
Streets were engulfed by a sea of black coats and hats as weeping ultra-Orthodox faithful honoured a cleric they deemed their supreme spiritual leader. The van carrying his body was held up for hours as masses blocked the route to the cemetery.
Dubbed 'Israel's Ayatollah' by critics who condemned many of his pronouncements as racist - he likened Palestinians to snakes and said God put gentiles on earth only to serve Jews - Yosef was revered by many Sephardic Jews.
Through the Shas (Hebrew acronym for Sephardic Torah Guardians) party he founded in the early 1980s, Yosef, regal in his gold embroidered robes and turban, also wielded unique political influence from his modest apartment in Jerusalem.
"The people of Israel lost one of the wisest of a generation," Prime Minister Benjamin Netanyahu said in a statement. "Rabbi (Yosef) was a giant in Torah and Jewish law and a mentor to tens of thousands."
More than 4,000 police officers were deployed to ensure the security of the "more than 700,000 people taking part in the largest of funeral ever in Israel," Rosenfeld said.
At its height, Shas - now in opposition - held 17 of parliament's 120 seats. For years, Yosef as its leader served as a political kingmaker who could make or break coalition governments.
His political messages were sometimes mixed: he viewed the occupied West Bank, captured in the 1967 Middle East war, as part of the Biblical Land of Israel, but in a challenge to mainstream rabbis, he said it was permissible to cede land to prevent bloodshed.
Although Shas served in governments that pursued peace talks with the Palestinians, Yosef voiced strong anti-Arab sentiments.
"Abu Mazen and all these evil people should perish from this world," Yosef said in a sermon in 2010, referring to Palestinian President Mahmoud Abbas. "God should strike them with a plague, them and these Palestinians."
Yosef also drew fire from Israelis when he once suggested that six million Jews had died in the Nazi Holocaust because they were reincarnated souls of sinners.
Abbas, meeting Israeli legislators in the West Bank after news of Yosef's death, asked them to convey his condolences to the rabbi's family, said a Reuters reporter who was present. Abbas resumed peace negotiations with Israel two months ago.
Yosef's heavily Arabic-accented Hebrew may have been difficult to understand, but Shas members followed his policy pronouncements and Biblical religious edicts as if they were divine commandments.
His major work, "Responsa, Yabia Omer", is a 10-volume collection of his rulings on issues of Jewish law and customs.
Weaving a new social fabric in a Jewish state dominated by a so-called elite of Ashkenazim, or Jews of European descent, he oversaw the establishment of Shas-run religious schools and charities that drew a new generation into his rabbinical fold.
His soft-spoken cadre of young Sephardic Orthodox activists, nattily attired in black business suits and neckties, helped to reshape their community's self-image as an Israeli second class.
Outside his home, weeping seminary students tore their white shirts with razor blades, in a traditional sign of mourning.
"How will the world run without the sun? How will the world run without the moon? What will be of us? Who will lead us? Who will take his place?," lamented Shas legislator Arye Deri.
Rabbi Reuven Elbaz, a follower of Yosef said: "Rabbi Ovadia was the father of Israel ... he gave his heart and his soul for the people of Israel ... there has never been as rabbi as great as him."
Israel's ambulance service said its crews were busy treating people who fainted in synagogues and at Jerusalem's Western Wall, a Jewish holy site, after learning of Yosef's death.
Born in Baghdad, Yosef arrived in Jerusalem when he was four and was ordained as a rabbi at the age of 20. In 1947, a year before Israel's founding, Yosef went to Cairo, where he headed its rabbinical court and became Egypt's deputy chief rabbi.
In 1950, Yosef returned to Jerusalem, serving as a judge in religious courts that deal with family matters and divorce and served as Israel's chief Sephardic rabbi from 1973 to 1983, a post now held by his son Yitzhak, one of his 11 children.
Yosef had been in failing health in recent months. President Shimon Peres visited his bedside on Monday in Jerusalem's Hadassah hospital, joining a steady stream of Shas politicians and top rabbis.
Four rabbis have been mentioned as possible successors, but with Shas outside Netanyahu's government, their political influence is likely to be limited.