Are you familiar with both federal and state overtime rules? You should be. It’s public policy and, depending on their classification, your employees are entitled to it. But let’s say there’s a disagreement about the overtime you paid and it turns into a lawsuit. Can you then fire an employee because they sued you for back overtime? Not in California. A company there just learned this lesson the hard way — and now a court has ordered the company to pay three of its former employees $584,612.

Here’s what happened.

Joong-Ang is the publisher of the Korea Daily, a Korean language newspaper based in California. In June of 2013, three of its employees filed a lawsuit claiming that the company didn’t pay them overtime wages that they were entitled to under state law. Just two months later, those three workers were terminated.

Now, this may have been a coincidence. That’s because on the same day they were let go, the company let go the rest of its employees at the same printing facility. However, those employees were immediately re-hired by another company that took over the operations — except for the three who claimed they weren’t told of the opportunity.

Hearing of this, the three unemployed workers added more claims for wrongful termination to their original unpaid overtime lawsuit. They won. The company appealed. The company lost on appeal late last month.

As Joanne Deschenaux writes on the Society for Human Resource Management’s blog, “… under [California] Labor Code Section 1199, it is a crime for an employer to fail to pay overtime wages as fixed by the Industrial Welfare Commission, the court noted. Therefore, if an employer discharges an employee for exercising his or her right to overtime wages, the worker may be entitled to damages for wrongful termination.” By “exercising his or her right” the court means filing a lawsuit against the employer.