Apple has been granted the right to sell the iPhone 7 in Indonesia following an agreement to invest around $44M in an R&D center in the country, reports Reuters. The investment was first rumored in November, and has now been confirmed by a senior government official in a text message.

Indonesia is an extremely important market for Apple as the world’s fourth most populous country after China, India and the USA … 

“Apple has committed around $44 million to invest in R&D over three years,” Suryawirawan said. “Therefore, they can distribute devices priced 6 million rupiah ($448) and above. That means all iPhones can be distributed.”

Indonesia has adopted a similar rule to India, effectively requiring foreign companies to create jobs in the country to gain approval to sell their products there.

Both countries have a requirement for companies to source at least 30% of their products locally. In the case of India, this is needed to be able to open branded retail stores while in Indonesia it’s a condition of selling LTE products above a certain value.

In Indonesia, the local investment threshold can be met by any combination of manufacturing, software development or other investment in the economy.

Reuters reports that while Apple now has the necessary permissions to sell its full range of products in the country, it still faces stiff competition.

It’s likely that other emerging markets will impose similar requirements on Apple and other large tech companies in order to ensure that the local economy gets its slice of the Apple pie.

In the second quarter of this year, South Korea’s Samsung led with a 26 percent share of Indonesia’s smartphone market by sales volume, trailed by China’s OPPO with 19 percent, according to research firm IDC. Both Samsung and OPPO have factories in Indonesia.

OPPO’s army of sales representatives, advertising blitz and middle-end pricing have propelled it to no. 2 in Indonesia within just three years.