JAKARTA — 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 walked 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.”

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.

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.

Obama, who spent part of his childhood in Jakarta, also visited the mosque in 2010 when he travelled to the archipelago.

In signing a note to be placed in the mosque’s guestbook, Kerry wrote: “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.

Ninety percent of Indonesia’s 250 million people identify as Muslims, and most practise a moderate form of Islam.