Saudi Arabiainfo-icon and Indonesiainfo-icon signed agreements in areas ranging from trade to aviation as King Salman began a nine-day visit to the worldinfo-icon's most populous Musliminfo-icon-majority country for the first time in almost half a century.

King Salman was treated to an elaborate official welcome as he arrived in Jakarta, his latest stop on an Asian tour seeking investment opportunities, at the head of a 1,000-strong delegation including princes and ministers.

After disembarking from his plane, he was met by President Joko Widodo before travelling past cheering crowds in pouring rain to a presidential palace at Bogor, south of Jakarta, where he was greeted by a marching band, a mounted honour guard and a 21-gun salute.

Almost 460 tons of equipment have been flown in for the visit, including limousines and escalators.

Preparations have been elaborate. Statues at the Bogor palace were covered up before the king's arrival. Some150 chefs have reportedly been hired to cook for the king's party. Widodo hailed the "historic" visit, adding: "As the country with the biggest Muslim population in the world, Indonesia will always have a special bond with Saudi Arabia."

The leaders oversaw the signing of 11 cooperation memoranda following Wednesday's talks at the Bogor palace. Apart from trade and aviation, they included agreements on boosting cooperation in scienceinfo-icon, healthinfo-icon and fighting crime.

Jakarta and Riyadh also inked an agreement that builds on an existing $6 billion deal between state-owned energy firms Aramco and Pertamina to expand an Indonesian oilinfo-icon refinery.King Salman, 81, said he hoped the visit would "contribute to the improvement of the bilateral relationship between our two countries".

The visit -- the first by a Saudi king to Indonesia in 47 years -- is one of the highlights of a rare Saudi royal tour of Asiainfo-icon, a region seeking investment as the world's biggest oil exporter tries to diversify its economyinfo-icon.

After the three-day visit to Jakarta, Salman and his entourage will head to the Hindu-majority resort island of Bali for a holiday, where they will reportedly stay in five luxury hotels.

On Thursday the king is due to give a speech to parliament and visit a major Jakarta mosque. He is also due to meet leaders of some of Indonesia's major Muslim organisations during the trip.King Salman began his three-week Asian tour in Malaysiainfo-icon earlier this week and is also set to visit Japaninfo-icon, Chinainfo-icon and the Maldivesinfo-icon.