KUALA LUMPUR - Malaysia's Terengganu state said on Wednesday it was open to buying a stake in national energy giant Petronas, after Prime Minister Mahathir Mohamad said he was considering such a sale to raise funds for his heavily-indebted federal government.

Petronas, the world's third-largest exporter of liquefied natural gas, is one of the biggest sources of revenue for the federal government that has a debt pile of more than 1 trillion ringgit ($239 billion).

Mahathir told Reuters on Tuesday that the government could sell Petronas shares privately to states such as Sarawak, Sabah, Terengganu and Kelantan where the company has most of its energy assets. 

Petronas, officially known as Petroliam Nasional Bhd, is fully owned by the federal government and has many units.

"If it's in the form of equity, say 5% or 10%, then we can probably consider (buying), a reasonable amount of equity," Ahmad Samsuri Mokhtar, chief minister of the eastern state of Terengganu, told reporters in the state capital, according to national news agency Bernama.

There is, however, no formal proposal on the table yet, said Ahmad Samsuri.

J.C. Fong, legal adviser to the Sarawak government, told Reuters he would not comment on Mahathir's statement on Petronas until he saw a proposal and had the chance to evaluate it.

Sarawak accounts for two-thirds of Malaysia's total gas production and almost a third of its oil, Fong has said. 

Sarawak and neighbouring Sabah, both located on the Borneo island and separated from peninsular Malaysia by the South China Sea, have the country's most prolific oil and gas reserves.

Both states have long called for a quadrupling of royalties paid by Petronas to 20% of its profit - a demand Mahathir has rejected, instead looking for other ways to satisfy the states. ($1 = 4.1700 ringgit)

(Reporting by Krishna N. Das; Editing by Muralikumar Anantharaman) ((Krishna.Das@tr.com; +60 18661 7562, +60323338022; Reuters Messaging: Twitter: https://twitter.com/krishnadas56))