JOHOR, Malaysia/JAKARTA, March 7 (Reuters) - On the southernmost edge of the Asian landmass and on the shores of the busy shipping lanes of the Singapore Strait, Malaysia's Petronas is starting up a state-of-the art petroleum processing hub, called RAPID.

The huge complex in Malaysia's Johor province is currently testing its systems, running crude oil through its fuel processing units and labyrinth of pipes and producing large exhaust gas fires from its flare tower. The flames are clearly visible for miles around, including on Indonesian islands just across the narrow strait.

The 300,000 barrels-per-day (bpd) RAPID or Refinery and Petrochemical Integrated Development will come onstream around May. Among other customers, it will sell fuel to Indonesia, shining a spotlight on the contrast between Petronas and its Indonesian peer Pertamina.

Both are state-owned oil companies that dominate the energy sector in their own nations. But their fortunes have markedly diverged because Malaysia has allowed Petronas to follow its own growth path, while Pertamina is hobbled by Indonesian government intervention and bears the burden of a subsidy programme.

"Lots of people see Petronas and Pertamina as twin companies. But that's not really the case. Petronas is very much a commercial company, almost like an independent oil company while Pertamina is driven more by government policy and agenda, a national oil company," said Andrew Harwood, research director for Asia/Pacific upstream oil and gas at energy consultancy Wood Mackenzie.

For Petronas, RAPID marks a milestone as it prepares for a future with less crude oil output while serving the region's booming fuel demand.

RAPID, being built in collaboration with Saudi Aramco, has cost around $15 billion and is one of Petronas' biggest ever investments. It is part of an even bigger Pengerang Integrated Complex (PIC) being developed by more than 50,000 workers at an estimated cost of more than 100 billion ringgit ($24.61 billion), and which will eventually also include a deep-water oil and a liquefied natural gas (LNG) import terminal.

Petronas declined to speak with Reuters about the project's details but has said RAPID "will position Malaysia to capitalise on the growing need for energy and petrochemical products in Asia in the next 20 years ... pushing our country into a new frontier of technology and economic development."

Like Malaysia, Indonesia is struggling to keep oil production up just as domestic fuel demand soars.

Once a member of the Organization of the Petroleum Exporting Countries (OPEC), Indonesia has seen its crude oil output dwindle from a peak of 1.6 million bpd in the early 1990s to below 1 million bpd.

It is now Southeast Asia's biggest fuel importer, importing more than 400,000 bpd of last year, at a cost of around $10 billion a year at current prices.

LITTLE INVESTMENT

Yet, the last time Indonesia built a major refinery was around 25 years ago.

A Refinery Development Master Plan (RDMP), launched in 2014 to double refinery output to over 2 million bpd within a decade, was confirmed last week by Pertamina's chief executive Nicke Widyawati.

"Starting from 2021, we will invest around $7 billion per year as these refineries (developments) are in progress," Widyawati said.

But many of Indonesia's refinery projects have suffered set-backs, like the delay in the upgrade of a refinery in the central Java area of Cilacap from 348,000 to 400,000 bpd. Due to be completed in 2021, it has been pushed back to 2023.

Fajar Harry Sampurno, the deputy minister for state owned enterprises, said Cilacap's delay was because the land for the site had yet to be acquired.

Saudi Aramco has also expressed interest in Cilacap, but Sampurno said "Aramco is still waiting" to invest as it first wants the land rights to be resolved.

Sampurno said such delays were causing Pertamina "big losses."

But Pertamina itself isn't investing enough.

The company says its capital spending target would be $4.2 billion to $4.5 billion this year, down from an earlier target of $5.5 billion.

On the other hand, Petronas raised its investment by 10 billion ringgit ($2.46 billion) to 55 billion ringgit in 2018, and spending is expected to rise again this year.

Once RAPID is completed, Petronas would likely start looking for a next big development project, possibly as an investment into overseas production or even in form of corporate acquisitions, said Harwood from Wood Mackenzie.

"NO WAY" TO NET EXPORTS

The consultancy estimates Petronas, which has invested far more than its Indonesian counterpart in exploration and acquisitions, will produce 1.6 million barrels per day of oil equivalent this year, which is a unit to describe joint oil and gas production, against vs 0.8 million barrels of oil equivalent by Pertamina.

Oil and gas reserves are estimated at 7.8 billion barrels of oil equivalent for Petronas and at 5 billion for Pertamina by Wood Mackenzie.

Sampurno, the Indonesian deputy minister, told Reuters there was "no way" Indonesia could become a net oil exporter again.

He said Pertamina should expand its refining capacity to meet booming demand, emulating Petronas.

But the Indonesian state-owned major, described by the government as an "agent of development", is struggling to keep up the required spending to finance oil and gas production and build the infrastructure to meet rising domestic fuel consumption.

Wood Mackenzie estimates Pertamina needs to boost spending to $6 billion in 2022, from just over $4 billion last year, just to maintain output. Pertamina's refinery plans and debt servicing will require another $23 billion up to 2025.

"Indonesia and Pertamina could capitalise on the discovery made last week by Repsol, which will attract attention from explorers. If they can capture some of this interest, Pertamina may find additional partnership opportunities," said Max Petrov, a senior corporate analyst at the consultancy.

A consortium led by Spain's Repsol last week announced finding new gas resources in South Sumatra in Indonesia, which Repsol claims to be among the 10 largest made in the world over the past year. ($1 = 14,175 rupiah) ($1 = 4.0650 ringgit)

(Reporting by Fergus Jensen and Wilda Asmarini in JAKARTA and Henning Gloystein and Roslan Khasawneh in SINGAOPRE; Additional reporting by Cindy Silviana and Bernadette Christina Munthe; Editing by Raju Gopalakrishnan)