Russian President Vladimir Putin has witnessed the signing of a deal in Jakarta to give Indonesia a state loan of $1bn (£500m) to buy Russian arms.
President Putin is keen for Russia to compete with the US and China
Mr Putin also held talks with his Indonesian counterpart Susilo Bambang Yudhoyono during the one-day visit.
Correspondents say the visit is Russia's response to growing Chinese and American competition in the region.
Indonesian armed forces are badly equipped, following years of sanctions from the EU and US.
Indonesia will use the Russian cash to plug the holes in its ageing arsenal, with a shopping list including attack helicopters, submarines and amphibious tanks.
Indonesian-Russian relations have become closer since a meeting in Moscow last December, when the leaders pledged to improve economic and military ties.
Indonesia has already bought several jets from Russia. The new deal makes Moscow its main foreign arms supplier.
The last time a Russian leader came to Indonesia was 50 years ago, before the break-up of the Soviet Union.
Moscow was then a key Indonesian ally and the country's main arms supplier.
Russia says it does not want to return to the past, and that its new relationship with Indonesia is not about ideology but about cementing Russia's presence in a region with growing importance.
After the deal was signed, Mr Putin told reporters that the two leaders had agreed "to expand co-operation in areas we consider most important - such as energy and mining, aviation, communications and others."
Mr Yudhoyono said that Indonesia would use the loan to "modernise our arms and military equipment for the navy, air force and army".
Earlier on Thursday Defence Minister Juwono Sudarsono said that part of the plan was "to reduce our dependency on the United States".
Russian hardware is also cheaper than American-made models.