You might think that if you can fire someone for any reason—or no reason at all—then you can fire them for complaining about discrimination. That is wrong. Retaliation is one of the most common mistakes employers make, and it is also one of the easiest ways to lose a lawsuit. Understanding how retaliation works will help you avoid it as an employer, or recognize it if you are an employee who has been wrongfully fired.

Retaliation happens when an employer punishes an employee for engaging in a protected activity. Protected activity means doing something that the law says you have a right to do without facing negative consequences. The most common protected activities are reporting discrimination, harassment, or other illegal conduct to a supervisor, HR, or a government agency like the Equal Employment Opportunity Commission. Also protected is participating in an investigation into such complaints, even if you are just a witness.

The key point is that the law does not allow an employer to take any negative action against an employee because of that protected activity. Negative actions include firing, demoting, cutting pay, giving bad performance reviews, reassigning to a worse shift or location, harassing, or even making threats. The law covers all of these if they are linked to the employee speaking up.

To prove retaliation in court, an employee must show three things. First, they engaged in a protected activity. That could be filing a formal complaint or simply telling their boss that a coworker’s jokes are offensive and against company policy. Second, they suffered a negative employment action. Being fired is the most obvious example, but a pay cut or a sudden transfer to a less desirable position also counts. Third, there must be a connection between the protected activity and the negative action. This connection is often shown by timing. If the employee complained on Monday and got fired on Wednesday, that timing looks suspicious. But it can also be proven by statements the employer made, such as saying, “I am tired of you stirring up trouble.”

Employers often defend retaliation claims by arguing that they had a legitimate, non-retaliatory reason for the firing. For example, they might say the employee was fired for chronic lateness, not for complaining. The court then looks at whether that reason is real or just a cover-up. If the employer’s stated reason is false or was applied differently to other employees, the retaliation claim can still succeed even if there is some evidence of misconduct.

One critical thing to understand is that the employee does not have to prove that the original discrimination complaint was correct. Even if the employee was wrong about the discrimination, retaliation is still illegal. The law protects good-faith complaints, not just proven ones. So if an employee honestly believed they were being discriminated against and reported it, you cannot fire them for that report even if the discrimination never happened.

Retaliation is especially dangerous for employers because juries sympathize strongly with employees who are punished for speaking up. In many cases, retaliation damages are higher than the damages for the underlying discrimination. Courts can award lost wages, emotional distress damages, and even punitive damages meant to punish the employer for intentionally breaking the law.

As an employer, you can protect yourself by creating a clear anti-retaliation policy, training managers never to punish employees for reporting concerns, and documenting all performance issues separately from any complaints. If an employee has a complaint pending, think twice about any adverse action. Make sure you have documented, legitimate business reasons that existed before the complaint, not just after.

For an employee who believes they were fired in retaliation, the first step is to file a charge with the EEOC or your state’s fair employment agency. You have a limited time—usually 180 or 300 days, depending on your state—so do not wait. Keep records of your complaint, any negative actions, and any comments from supervisors. The law is on your side if you were silenced for speaking up.

Retaliation undermines the entire purpose of anti-discrimination laws. Without protection, employees would be too afraid to report problems, and discrimination would go unchecked. That is why courts treat retaliation as a serious violation. Whether you are an employer or an employee, the rule is simple: do not punish someone for doing what the law encourages them to do.