The federal court has blown a hole in the government’s so-called “backpacker tax”, ruling it does not apply to some visitors who are in Australia on a working holiday visa.

In a judgment handed down on Wednesday, judge John Logan said the impost – a 15% tax on income that would normally be tax-free – could not be levied on some backpackers who were also Australian residents at the time because doing so violated agreements with other countries.

Catherine Addy, the backpacker who brought the test case, is a British national but the solicitors who organised the lawsuit, Taxback.com, said similar treaties also existed with the US, Germany, Finland, Chile, Japan, Norway and Turkey.

These countries account for about half of all visitors to Australia who hold working holiday visas, they said.

Australian residents are not taxed on income they earn up to a threshold of $18,200.

However, in 2016 the government introduced the backpacker tax, which hit people who come to Australia on a working holiday visa with a tax of 15% from the first dollar they earn.

Logan found that the government discriminated against Addy by charging her the tax in 2017 because she held a working holiday visa.

“That is a disguised form of discrimination based on nationality,” he said. “That is exactly the type of discrimination which is prohibited by … the double taxation agreement.”

A Taxation Office spokesman said an appeal was being considered and played down the significance of the ruling.

“This decision only affects the tax rates applying to 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,” he said.

“We consider most working holiday makers are not residents for tax purposes and this decision has no impact for these working holiday makers.”

However, this interpretation is likely to also face challenge, based on another of Logan’s recent rulings in which he said a backpacker who intended to move to Australia for 10 months, and does so, would become a resident for tax purposes.

The minister responsible for tax, assistant treasurer Michael Sukkar, said it would be up to the commissioner of taxation, Chris Jordan, to decide whether to appeal.

“The government will await the finalisation of any legal process before considering if any policy response is needed,” he said.