* Q2 foreign investment +30.2 pct y/y
* New figure sets a quarterly record
* Mining rules hit exports, but interest stays
* Official sees bigger numbers ahead (Adds quotes, details)
By Adriana Nina Kusuma and Rieka Rahadiana
JAKARTA, July 25 (Reuters) - Foreign direct investment in Indonesia stayed strong in the second quarter, showing the G20 member remained a magnet in a troubled global economy and that changes in mining ownership rules are not cutting investor appetite so far.
A requirement that foreign companies sell 51 percent of their mines to Indonesians within 10 years of production is hurting exports such as nickel and copper ores. But at least in the latest quarter, new investment has started as miners seek to comply with new rules that they build local smelters or process ore domestically by 2014.
Between April and June, total FDI rose 30.2 percent year-on-year to a quarterly record of 56.1 trillion rupiah ($5.92 billion), the country's investment board said on Wednesday.
The board, which does not give a breakdown of investment per sector, said mining accounted for 16.3 percent of second-quarter FDI and base chemicals was the target of 16 percent.
"The biggest FDI is still in mining and manufacturing," said new investment chief M. Chatib Basri.
He expressed confidence that Indonesia can achieve a target of 206.8 trillion rupiah in FDI this year, which would easily top 2011's record of 175.3 trillion rupiah. "Indonesia's potential can still rise," he said.
Basri said the government is in talks with Foxconn Technology Group of Taiwan, the main supplier of Apple Inc. , about investing in Indonesia, though he gave no details.
Indonesia, bolstered by upgrades to investment grade status by two ratings agencies, has drawn strong portfolio and direct investment in recent years. Firms have been looking to tap abundant natural resources and booming middle-class spending in Southeast Asia's largest economy, which has been growing more than 6 percent a year.
In the first quarter of 2012, FDI rose 30.3 percent from a year earlier to 51.5 trillion rupiah, led by mining. In the first half, FDI was up 28.1 percent year-on-year to 107.6 trillion rupiah.
Indonesia's data on FDI does not cover all sectors, as it excludes money invested in oil and gas activities as well as in banking.
So even if DBS Bank of Singapore succeeds in its proposed bid to buy majority control of Indonesia's PT Bank Danamon, that investment will not figure into the FDI data.
The investment board's new FDI number comes out a week after the central bank announced revised ownership rules for banking, in which new investors will only be allowed to take a maximum 40 percent stake, down from 99 percent previously, unless they get approval from Bank Indonesia.
This year, the Indonesia government has announced some policy changes widely seen as nationalistic. Key ones apply to mining, which accounts for 12 percent of gross domestic product as Indonesia is the world's largest exporter of tin and thermal coal.
The requirement that foreign miners sell 51 percent of their operation within 10 years of production has rattled the industry.
Exports of nickel and copper ores and concentrates slumped up to 90 percent in June, according to the trade ministry. But the industry minister said it had received more than 100 proposals from miners to build local smelters.
Through different ways, more shares in mining operations are expected to shift into Indonesian hands. Freeport McMoRan Copper & Gold Inc has offered Indonesia a further 9.36 percent stake in its local subsidiary, which runs the world's second biggest copper mine.
The second-quarter FDI data indicates there's been no tempering in international interest in investing in Indonesia.
"FDI rose because while many countries are deteriorating, where else to find an attractive and resilient country? There aren't many countries which are more insulated from crisis than Indonesia," said Wisnu Wardana, economist at CIMB Niaga in Jakarta.
Still, Wardana warned that the country must make the right moves to keep attracting investors.
"Indonesia needs efforts to improve infrastructure and fight corruption. If there's a decline in those efforts, then FDI could slow," he said.
Portfolio investment in Indonesian stocks and bonds have slowed this year as funds prefer to hold safer assets such as the U.S. dollar. The Indonesian rupiah has weakened 4.5 percent this year, the second worst performer among emerging Asian currencies after the Indian rupee.
Foreign ownership in Indonesian government bonds fell to 29.2 percent of the total tradable bonds as of July 20, from 30.8 percent at the end of December and more than 35 percent in August 2011.
The Indonesian stock market is not the darling of foreign investors it was two years ago, when the benchmark soared 46 percent. The index gained 3.2 percent in 2011 and is up 4.5 percent this year.
Strong non-portfolio investment is expected to help Indonesia again grow more than 6 percent this year in spite of flagging exports.
The central bank in early July revised down the upper limit of its economic growth forecast for this year to 6.2 percent, from 6.5 percent previously. Last year the economy expanded 6.5 percent, the highest since 1996.
The country got a boost at the end of last year when Fitch Ratings upgraded it to an investment grade sovereign status on a par with India, but Europe's debt woes and a series of Indonesian government moves to limit foreign ownership have unnerved investors.
New investment is key to achieving the country's ambitious target of becoming a top 10 global economy by 2025 by selling more finished products rather than simply exporting raw materials, while improving its creaky infrastructure to achieve President Susilo Bambang Yudhoyono's target of 7 percent annual economic growth.
$1 = 9,475 rupiah Writing by Neil Chatterjee and Aditya Suharmoko; Editing by Richard Borsuk