Australia's ‘backpacker tax’ illegally targeted some foreign workers, a court ruled Wednesday, leaving people who spent time in the country on holiday working visas in line for tax rebates.

From 2017, Canberra applied a 15 percent levy for every dollar earned for two categories of working holiday visas linked to seasonal labour.

In a landmark decision Wednesday, a Brisbane court ruled the levy -- dubbed the ‘backpacker tax’ -- cannot be applied to a British woman due to a double taxation treaty between Australia and the UK.

Similar agreements are also in place with the United States, Germany, Finland, Chile, Japan, Norway and Turkey according to international accounting firm Taxback.com.

‘That is a disguised form of discrimination based on nationality,’ judge John Logan said.

Australians begin paying tax once their annual income exceeds Aus$18,200. That was also the previous threshold for the working holiday visas.

The Australian Tax Office said it was considering whether to appeal the decision.

It added the ruling only affects a minority of working holiday makers ‘who are also residents, and only those from countries affected by a similar clause in the double tax agreement with their home country’.

In the case decided Wednesday, the British woman lived mainly in a Sydney sharehouse and stayed for the most part in the state of New South Wales -- meaning she was considered a ‘resident’ for tax purposes in Australia.

According to the ATO website, others -- who travel from place to place -- can be classed as ‘foreign residents’ for taxation.

‘In our view it was very clear, when the tax was introduced in 2016, that it discriminated against foreign workers and breached several international tax agreements,’ Taxback.com CEO Joanna Murphy told the ABC.

The public broadcaster estimates up to 75,000 backpackers could be in line for a refund worth hundreds of millions of dollars following Wednesday's decision.

The government had originally sought to implement a levy of up to 32.5 percent, but this was met with outcry by farmers who rely on working-holiday makers for seasonal labour.