CANBERRA, Australia (AP) — Australia’s highest court on Wednesday upheld a government decision to fire a public servant who used a pseudonym to criticize government immigration policy on Twitter.

The High Court’s seven judges unanimously overturned a lower court’s decision that Michaela Banerji’s dismissal was not reasonable and that public service rules around the use of social media and making public comment “unacceptably trespassed on the implied freedom of political communication.”

The Community and Public Sector Union, which represents public servants, said the decision had serious implications for free speech and could potentially affect almost 2 million Australians who work for the federal, state and local governments.

Banerji used the Twitter handle “LaLegale” to send more than 9,000 tweets in six years while she was employed by what was then called the Department of Immigration and Border Protection from 2006 and 2012. The tweets were often critical of government policies, such as banishing refugees who attempt to reach Australia by boat to camps on the poor Pacific island nations of Papua New Guineas and Nauru.

A department investigation discovered that Banerji was behind the tweets and had breached the Australian Public Service Code of Conduct, which demands civil servants appear to be politically impartial. Her job was terminated in September 2013.

The next month, she lodged a claim for workers’ compensation for a post-traumatic stress disorder that she blamed on her termination. The claim was refused because her termination was deemed a “reasonable administrative action.”

Banerji appealed that decision in a public service court known as the Administrative Appeals Tribunal, arguing that her tweets were “entirely anonymous,” did not disclose departmental information, were sent from her personal phone and outside office hours.

The Australian Constitution does not explicitly protect freedom of expression. But the High Court has previously ruled that an implied freedom of political communication exists in Australia because that is essential in a democracy.

The tribunal upheld her appeal and her right to political communication, but the High Court decision rules out the prospect of compensation.

A tearful Banerji said outside court that she pursued the case “to affirm the role of this freedom of speech for public servants and we failed.”

“It’s not just a loss for me, it’s a loss for all of us and I’m very, very, very sorry,” Banerji told reporters.

Her lawyer Allan Anforth said outside court that he expected the decision would entitle any employer to fire an employee for criticizing the boss’s stance on a political issue.

“The logic of it does not stop at the bounds of the public service,” Anforth said.

The Community and Public Sector Union CPSU National Secretary Nadine Flood said her union “has always defended the rights of public servants to participate in our democracy like everyone else can.”

“People working in Commonwealth agencies should be allowed normal rights as citizens rather than facing Orwellian censorship because of where they work,” Flood said in a statement.

The conservative government’s approach to social media and the public service had become even more draconian, with a social media policy released in 2017 that meant public servants could be disciplined or fired for “liking” someone else’s post or posting emojis.

“The government’s overreach on social media has been bad for the public sector and bad for our democracy,” Flood said.