Frigieri ruled that because Odebrecht headed the entire project it was responsible for the treatment of the workers. He also ruled the illegal importation of the workers and restriction of their movements constituted human trafficking.
In a statement, Odebrecht said Brazilian courts had no jurisdiction over the case because the subsidiaries submitted the workers to slave-like conditions and as such it had no direct control over the alleged abuses.
It said it would appeal the ruling.
The ruling came about two months after the company's president Marcelo Odebrecht was arrested for his alleged involvement in the massive corruption scandal at Petrobras, Brazil's state-owned oil company.
He was arrested on charges of cartel formation, money laundering and diversion of public funds.
According to prosecutors, the scheme at Petrobras involved roughly $2 billion in bribes and other illegal funds. Some of that money was allegedly funneled back to campaign coffers of the ruling party and its allies. It also allegedly included the payment of bribes to Petrobras executives in return for inflated contracts.
The AP contributed to this report.