WILLISTON, N.D. - A federal judge has ordered a drilling rig service company working in North Dakota's Oil Patch to pay a former worker $70,000 as part of an agreement to settle a lawsuit that alleged he was harassed because he is gay.

Rocky Mountain Casing Crews must pay the sum to Michael Allyn, a former driver, and provide training and enact policies to address sexual harassment in the workplace. The firm was also ordered to deal with such complaints promptly and not retaliate against those filing complaints, according to the firm's agreement with the U.S. Equal Employment Opportunity Commission (EEOC), which brought the case on Allyn's behalf.

When the case was filed in December 2016, it was the first in North Dakota charging that an employer in the state had allowed an employee to be subjected to sexual harassment because of his sexual orientation. The judge's order for a settlement came a year later in December 2017.

In the lawsuit, the EEOC alleged that Allyn's co-workers called him offensive slurs, defaced company vehicles with sex-based remarks about him, and left him pornographic magazines with upsetting material.

The EEOC said Allyn's manager made offensive jokes about gays to or around him, made him the butt of derogatory sex-based comments, gave him children's toys and board games, and gave him a hat with a Spanish slang word for homosexual on it.

The court complaint added that one of Allyn's male co-workers tried to sexually assault him.

Such treatment started about a year after Allyn began working at Rocky Mountain Casing Crews and continued until his employment there ended in April 2015, the complaint said.

Allyn complained about the treatment, the EEOC said, but no prompt corrective action was taken.

Rocky Mountain Casing Crews is registered as a Wyoming business but is also registered in Williston and North Dakota, the court complaint said.

Title VII of the Civil Rights Act of 1964 prohibits discrimination because of sex. The EEOC has concluded harassment and other discrimination because of sexual orientation is a form of prohibited sex discrimination.