Comcare is appealing a ruling that found an Immigration Department worker’s sacking for critical tweets was unlawful.

The federal workplace insurer has lodged an appeal over the appeals tribunal's decision for Michaela Banerji to receive compensation.

The Administrative Appeals Tribunal ruling challenges Australian Public Service rules stopping public servants from expressing their political views on social media.

Ms Banerji took the government to the tribunal after Comcare refused to compensate her for a psychological condition she developed after being sacked in 2013.

She was given the axe in response to tweets she made under a pseudonym that criticised offshore detention and immigration policies.

She did not disclose any confidential information and made most of the tweets on a personal device outside of work hours.

The tribunal found that she suffered depression and anxiety that qualified as an injury under federal compensation laws.

The tribunal said the dismissal intruded on her right to free political expression.

The tribunal said that government efforts to restrict anonymous comments from staff were ‘Orwellian’.

It the decision to sack her “impermissibly trespassed upon her implied freedom of political communication … with a law only weakly and imperfectly serving a legitimate public interest”.