Saudi Arabia's King Salman on Wednesday landed at a military airbase in the capital of Indonesia, the world's largest Muslim-majority country, to kick off the longest leg of a month-long trip across Asia.
The visit is the first by a Saudi monarch in nearly five decades and will see the two nations sign a pact to combat terrorism, according to the Saudi envoy to Indonesia.
Secular Indonesia has grown increasingly concerned about security, after several attacks over the past year blamed on supporters of Islamic State, and has deployed at least 9,000 police and military for the 12-day visit.
The octogenarian King Salman descended slowly on his personal escalator from the plane before being met by Indonesian President Joko Widodo who escorted him along a red carpet flanked by guards to a limousine.
The king is accompanied by an entourage that Indonesian officials have said could number up to 1,500. His party is bringing 459 tons of luggage and equipment, including two luxury cars, according to media.
Roads were closed to traffic and snipers stationed along the route the king's convoy took from the airport to the presidential palace in Bogor. Hundreds of schoolchildren holding Indonesian and Saudi flags welcomed the king.
King Salman will hold talks with Widodo and attend a reception. He will also meet religious leaders and visit Southeast Asia's biggest mosque Istiqlal before heading to the vacation island of Bali for more than a week.
Indonesia hopes to attract billions of dollars of investment from the kingdom, though the trip will also focus on building cultural and religious ties and promoting education.
Saudi Arabia aims to open more Islamic schools in Indonesia, which will teach religion using the Arabic language, and step up the number of scholarships for students.
The king's visit to Indonesia also comes as fringe Islamist groups grow in influence and Muslim leaders take an increasingly strict line on Islamic issues, which is at odds with Indonesia's traditional brand of moderate Islam.
Indonesian police killed a militant on Monday after he detonated a small bomb in the West Java city of Bandung. Security officials said they were investigating whether he had links to a radical network sympathetic to Islamic State.
King Salman started his Asia trip in Malaysia and also plans to visit Brunei, Japan, China, the Maldives and Jordan.