The U.S. Equal Opportunity Employment Commission must pay more than $1 million to a law firm that it sued unsuccessfully for allegations of sexual harassment and pregnancy discrimination, a federal judge has ruled.

The EEOC action was a “frivolous” lawsuit against Robert L. Reeves & Associates, which practices immigration law, U.S. District Judge Dickran Tevrizian said in a ruling issued Monday.