MTN earnings in Nigeria, its largest market, rose almost a third in the nine months to September, the company said on Wednesday.

The strong performance comes amid a legal battle between the company and the Nigerian regulatory authorities over $2bn in allegedly unpaid taxes, with the matter expected to be heard in court in January.

The Nigerian attorney-general has demanded that Africa’s biggest telecom company pay the tax bill relating to the import of equipment and payments to foreign suppliers from 2007 to 2017. MTN has argued that the claim is without merit and that the attorney-general exceeded his powers in making the request.

The group said profits grew about 40% due to positive subscriber growth and rising data revenue.

Earnings before interest, taxation, depreciation and amortisation (ebitda) rose 39.3% to 460.1-billion naira ($1.27bn), with data revenue rising 34.9% year on year during the period, the company said.

The subscriber base of MTN’s Nigerian business, which accounts for about a third of the group’s total profit, grew by 100,000 to 61.6-million quarter on quarter.

“Our performance was very encouraging, demonstrating the resilience of our business despite a challenging operating environment,” said MTN Nigeria CEO Ferdi Moolman. “We sustained double-digit growth in service revenue led by growth in voice and data revenue.”

Peter Takaendesa, a portfolio manager at Mergence Investment Managers, said MTN Nigeria’s numbers have “remained strong and largely in line with company guidance of double-digit service revenue growth as well as profit margins expanding further.

“However their key competitor, Airtel Nigeria, has grown revenue faster over the same period, suggesting MTN Nigeria has not fully capitalised on the growth opportunity in the market.

“This could be temporary as MTN rebased its prices to improve its competitive position and now have full access to their 4G spectrum, but the market is likely to watch for this trend and reward MTN more if it reverses the market share loss,” he said.

In a separate announcement, MTN said its operations in Ghana reported a 1.1% increase in subscribers to 21.6-million. Ebitda grew 63% to 1.875-billion Ghanaian cedi ($342.87m), with profit after tax up 4.8% to 689-million Ghanaian cedi for the period.

This was due to good growth in subscribers, customer value management and continued improvements made to MTN Ghana’s network, the company said.

MTN, which operates in 21 countries, is set to release the group financial performance update for the third quarter of 2019 on Thursday.

Takaendesa said MTN Nigeria should contribute strongly to the group’s numbers on Thursday, especially when translated to rand. Progress on planned asset disposals, Nigeria banking licence expectations and SA performance will be variables to be watched, he said.