The company may benefit from India’s new investment rules, possibly helping it reduce its dependence on China.

Apple Inc is poised to start online sales of its devices in India within months, a person familiar with the matter said, benefiting from new rules making the world’s fastest-growing smartphone market more attractive to foreign brands.

On Wednesday, India eased rules that forced companies such as Apple to source 30% of their production locally — a requirement the iPhone maker has been lobbying against for years — to include exports as part of the requirement.

That rule posed a problem for electronics brands because most of its devices and components are manufactured in China. The government also allowed so-called single brand retailers to set up online stores before physical shops.

With escalating trade tensions damaging ties between the U.S. and China, New Delhi’s latest investment rules could provide a boost to Apple, allowing it to grow sales in the country and possibly help it reduce its high dependency on China by building out an alternative supply chain in India.

The Cupertino, Calif.-based device and services company will begin selling its iPhone, iPads and Apple Mac computers online in the coming months. It’s also firming up the Mumbai location of its first company-owned brick & mortar store in India — likely to open next year — the person said, asking not to be identified as the details are confidential. Selling online will be a big step forward for Apple in a country where counterfeit products abound in online platforms increasing buyers’ distrust.

Apple didn’t immediately respond to an email seeking comments.

Some of the phone maker’s older devices are assembled by Taiwanese contractor Wistron Corp. in a factory in Bangalore, while the world’s largest contract manufacturer, Foxconn Technology Group, tests assembly of Apple’s latest iPhone X in a factory near Chennai.

Apple has an insignificant share of the India’s booming smartphone market as its high prices and hefty import tariffs of as much as 20% put its products beyond the reach of average Indians. Sales of the iconic iPhones slid dramatically in 2018 and early 2019, forcing the phone maker to offer steep discounts on even its latest models.

India with 1.3 billion people is the last remaining large market for smartphone makers, and the new rules pave the way for Apple to control its own retailing and branding, both online and offline. Currently, it sells through franchisee stores and via online retail platforms such as Amazon India and Walmart-owned Flipkart Online Services Pvt.

India’s online retail market is surging and smartphones account for a chunk of e-commerce companies’ sales. Over a fifth of the phones sold in the country are through online channels and through direct sales, Apple could win greater customer loyalty and even out the playing field with Chinese brands such as Xiaomi and OnePlus, which have gained popularity in the market on aggressive online selling strategies.