US Secretary of State John Kerry visited Southeast Asia's largest mosque during his visit to Indonesia Sunday, paying tribute to Islam in the world's most populous Muslim-majority nation. After removing his shoes outside the Istiqlal mosque in the heart of Jakarta, Kerry took a 20-minute tour through the vast building accompanied by grand imam Kyai al-Hajj Ali Mustafa Yaqub. Calling it an "extraordinary place", the top US diplomat told Indonesian reporters: "I am very privileged to be here and I am grateful to the grand imam for allowing me to come." He then said in Arabic "As-salaam alai-kum" (peace be upon you), a greeting often used by Muslims around the world. The administration of US President Barack Obama has worked hard to try to repair relations with the Muslim world, which were badly frayed under the previous administration with the 2003 invasion of Iraq. Obama, who spent part of his childhood in Jakarta, also visited the mosque in 2010 when he travelled to the archipelago. The United States and other Western powers have often referred to Indonesia -- the world's third biggest democracy -- as a bridge to the Muslim world. Ninety percent of Indonesia's 250 million people identify themselves as Muslims, and most practise a moderate form of Islam. - Fresh spying allegations - But the two-day visit that began on a colourful note may be marred by fresh spying allegations that emerged Sunday in a New York Times report. The report said Australia offered intelligence to the US National Security Agency (NSA) to give Washington leverage during a trade dispute with Jakarta. The report, based on leaked documents by former NSA analyst Edward Snowden, said that the Australian Signals Directorate offered the NSA information "including communications between Indonesian officials and the American law firm" that was representing Jakarta in the trade dispute. Kerry and Indonesian officials have not commented on the issue, but the secretary of state may have to answer questions when he meets Foreign Minister Marty Natalegawa for dinner Sunday. He will also hold a joint press conference with the minister Monday morning before meeting President Susilo Bambang Yudhoyono. At the mosque, Kerry showed no signs of any diplomatic tension, smiling for the cameras after beating a giant drum that soared several feet above his head at the mosque, as the imam explained drums were once used as a call to prayer. Kerry signed a note to be placed in the mosque's guestbook, reading: "It has been a special honour to visit this remarkable place of worship. "The amazing space and light and the extraordinary dome are the perfect way to welcome prayers. "We are all bound to one God and the Abrahamic faiths tie us... together in love for our fellow man and honour for the same God. May peace be with you." The Istiqlal mosque was commissioned in 1961 by the then-Indonesian leader Sukarno and took 17 years to complete. Its vast 12 columns hold up an impressive green dome, and at Ramadan it is often packed to capacity with space for some 130,000 worshippers. Kerry gave a talk on climate change on Sunday afternoon and will meet ASEAN secretary-general Le Luong Minh in the evening. Indonesia is just one stop on Kerry's regional trip to reinforce Washington's "pivot" to Asia, partly aimed at improving trade in the region to help boost jobs in the United States. Kerry has visited China and South Korea, and is scheduled to fly to Abu Dhabi on Monday afternoon.