A PUBLIC servant who was injured while having sex during a work trip has won compensation after a five-year legal battle.

The full bench of the Federal Court has dismissed an appeal from workplace health insurer Comcare, which had argued the woman's motel room tryst had nothing to do with her job.

However, the court said it did not matter whether she spent her evenings having sex or ''playing a game of cards'', she was still, in effect, at work.

The case, which has involved three legal appeals, is likely to have significant repercussions for employers, as it clarifies when they are responsible for staff.

The woman, who worked for a federal government agency, was sent on a work trip to an office in regional NSW in November 2007.