Anglo-Australian mining giant BHP Billiton(BHP) - Get Report(BBL) - Get Report is in dispute with the Australian Tax Office for a total of A$1.02 billion ($772 million), over sales through its Singapore office and is prepared to fight the government in court if need be.

Arguing the dispute is "a valuation issue and does not involve tax avoidance," BHP said it "does not agree with the ATO's decision" and intends to defend its position "including by initiating court action if necessary."

The dispute comes at a time when Australia - like the U.S., the U.K. and the European Union - is cracking down and tightening up on what governments argue are tax avoidance schemes which are costing them billions of dollars every year.

Australia is reportedly investigating at least 15 multinationals it says are using the Singapore scheme, including BHP's main Anglo-Australian rival, Rio Tinto, (RIO) - Get Report (RTNTF) and the tax authority has also issued a warning to accountancy firms to avoid being too "clever" in the transfer pricing schemes they advise multinational clients to use.

The details of BHP's specific disagreement are set out in the company's 2016 tax report.

Arguing the case, BHP said the taxes concerned are on marketing activities by its Singapore-based marketing subsidiary office for which the Singapore government has granted the company a tax incentive.

But it said 58% of the profit made by the marketing business from the sale of its Australian commodities are taxed at the Australian corporate rate. (The other 42% would normally accrue to the U.K. tax authorities, since that part of the Singapore business is owned by BHP's U.K. listed arm. But those profits are not taxed under the U.K.'s Controlled Foreign Company rules.)

BHP's argument with the ATO relates to amended assessments from the tax authority which claim the company underpaid compared with the true value of the commodities sold, over an eleven-year period from 2003 to 2013. The valuation dispute is also relevant for the calculation of a local tax, the Minerals Resource Rent Tax, for which the government said it underpaid in 2013.

The company has already paid half of what the taxman is demanding, according to Australian practice, but the amount outstanding is still growing, as interest and penalties continue to mount.

However, BHP pointed out that the amount in dispute is small compared with its overall tax and royalty payments to governments in Australia and worldwide. It paid $2.5 billion in Australian federal and state taxes in  the financial year ending 2016 alone and $3.6 billion worldwide.

The ATO was not available for comment overnight in Australia.

The miner's stock closed up 0.53% in Sydney at A$20.72. In London it was up 0.82% at 1,041 pence a share in early afternoon-trading