PARIS - When US President Barack Obama first addressed the Muslim world in its traditional heartland last year, his speech was laden with references to the past, to Islam and to the tensions plaguing the Middle East. Updating his speech on Wednesday on the far eastern fringe of that world, his upbeat remarks about Indonesia's democracy, development and diversity spelled hope for the future. But they were also veiled reference to autocratic Muslim countries. He held up Indonesia as an example for others to emulate, praising the progress it has made from dictatorship to a vibrant democracy tolerant of other religions. Cairo and Jakarta offered contrasting backdrops to review Washington's relations with countries whose main link is a faith they practice in varied and sometimes contradictory ways. The speeches clearly reflected those differences. In Cairo, the president spelled out seven problems to be solved in the Middle East. The Jakarta speech praised three areas where he said the world's most populous Muslim nation enjoyed success. "That is not to say that Indonesia is without imperfections. No nation is," Obama said. "But here can be found the ability to bridge divides of race and region and religion." While both speeches stressed the US was not at war with Islam, the Cairo address focused far more on religion. Obama quoted the Koran four times, spoke of "civilisation's debt to Islam" and said the faith had "a proud tradition of tolerance." At the same time, he warned: "Among some Muslims, there's a disturbing tendency to measure one's own faith by the rejection of somebody else's faith." The tone was quite different in Jakarta, where he said: "Just as individuals are not defined solely by their faith, Indonesia is defined by more than its Muslim population." Egypt is about 90 per cent Muslim and 10 per cent Christian, while Indonesia is about 86 per cent Muslim and 9 per cent Christian, with Hindus and others making up the rest. Religious terms were among the most frequent words used in the Cairo speech - Muslim or Muslims were mentioned 46 times, Islam and Islamic 23 times and religion and faith 17 times. By contrast, the Jakarta speech referred far more to the country - Indonesia or Indonesian were mentioned 69 times - and political concepts such as democracy, progress, development and freedom were all used more frequently than religious ones. Perhaps fitting for a democratic leader, the most frequent word in Cairo was people, spoken 45 times, far ahead of world (29) in second place and then Muslim (27). In Jakarta, Indonesia topped the list at 49 times, trailed by people (20) and world (14) in third place. The president stressed his familiarity with Islam in Cairo, noting he heard the call to prayer as a boy in Jakarta, had Muslim relatives in Kenya and worked with Muslims in Chicago. He paid tribute to great past achievements of Islamic civilisation, pledged to fight against negative stereotypes of the faith and defended Muslim women's right to wear headscarves. While he included the nostalgic reference to the Islamic call to prayer in Jakarta, Obama's focus on faith there was more about religious tolerance. He briefly touched on problems in the Middle East to say more work remained to be done there. The Qu'ran, which won applause in Cairo every time he referred to it, went unmentioned in Jakarta. Another applause line from last year, the reference to his typically Muslim middle name Hussein, was also missing on Wednesday. He said in both speeches he is a Christian, a fact doubted by 18 percent of Americans who told a recent poll they believed he is a Muslim. The main issues Obama mentioned in Cairo were violent extremism, the Israeli-Palestinian conflict, nuclear weapons, democracy, religious freedom, women's rights and development. In Jakarta, he addressed "three areas that are closely related and fundamental to human progress - development, democracy and religion."