The coal mining company run by President Donald Trump’s nominee to be the nation’s top mining regulator has already come under criticism for weaknesses in its safety record. It turns out the company was also found by the government to have illegally retaliated against a foreman who complained about sexual and ethnic harassment from supervisors, unsafe conditions and drug use at one of its mines.

The little-noticed case involved a foreman at a mine operated by Rhino Energy WV. At the time, the president of the mine’s parent company, Rhino Resource Partners, was David Zatezalo, who is now Trump’s nominee to run the Mine Safety and Health Administration. A Senate committee is scheduled to vote on his nomination Wednesday.

In the West Virginia case, Michael Jagodzinski, a foreman at the mine located near the town of Bolt, complained in 2011 that he was the target of ethnic and gay slurs. The company illegally retaliated against him, falsely accusing him of sexual harassment, and then fired him, the U.S. Equal Employment Opportunity Commission found. As a result, Rhino Energy WV entered into a five-year consent decree last year, agreeing to pay $62,500 to Jagodzinski and implement reforms, including a policy against harassment and training for all managers and employees on prohibitions against discrimination and retaliation. The company also agreed to report how it handles any internal complaints of discrimination to federal regulators, and post notices about the settlement at all mine sites.

Zatezalo retired from Rhino in 2014. If confirmed to his new post, he would run an agency that is part of the Labor Department. It conducts regular inspections, trains the industry on best practices and levies penalties against mining companies for violations.

Democratic senators have questioned Zatezalo’s record in the industry, citing safety issues at mines he oversaw in West Virginia and Kentucky. One of his mines received two consecutive “pattern of violations” citations from the mining safety agency — a rare sanction used for repeat offenders.

Based on those citations, Sen. Joe Manchin, D-W.Va., who often throws his support behind the mining industry’s priorities, announced he would oppose Zatezalo’s confirmation, saying he is “not convinced” the former coal executive “is suited to oversee the federal agency that implements and enforces mine safety laws and standards.”

Zatezalo did not respond to a request for an interview about the harassment case. A spokeswoman for the mine safety administration declined to comment about the allegations.

The problems at the Bolt mine were brought to the attention of federal authorities by Jagodzinski. The EEOC ultimately found that the company engaged in “unlawful employment practices” starting in May 2011.

According to the government’s complaint, Jagodzinski faced a hostile work environment based on his Polish ancestry, including a barrage of insults and false allegations of workplace violations. The company allegedly allowed graffiti on the walls of the mine Jagodzinski supervised, with messages such as “Jag the fag.” Both supervisors and rank-and-file mine employees referred to Jagodzinski using that slur and “stupid Polack,” the EEOC said.

“Supervisory personnel failed to take action to stop the harassment or prevent it from recurring,” the government’s complaint reads. “Instead, supervisors participated in the harassment.”

A poster hung in the workplace likening Jagodzinski to a caveman, with the message: “JAG IS A FAG.” At one point, according to federal authorities, another employee took Jagodzinski’s phone and used it to take a photo of his own testicles.

“The harassment was open and obvious to supervisory personnel,” federal authorities found, “and supervisory personnel participated in the harassment.”

In a sworn deposition, Jagodzinski said managers used drugs on the job. In one case, he said managers tipped off the mine’s employees about an imminent drug test.

Jagodzinski said in an interview with ProPublica that the harassment started because he was trying to enforce workplace safety rules. “I was against them breaking rules and doing drugs and stealing,” Jagodzinski said. “Oxy, nerve pills, synthetic weed, smoking underground, snorting pills underground. This place was the absolute worst place I’d worked in my entire life.”

In a sworn deposition, a company executive said Zatezalo approved the termination, but denied that the company harassed Jagodzinski or fired him as retaliation. The company, he said, had strict policies against drug use.

“These people work in a confined space, underground in a confined space where large equipment moves. Any impairment to judgment is a very, very high risk, so we tolerate — we tolerated zero,” the executive said.

Court filings show Zatezalo was also scheduled to be deposed, but it appears the company agreed to settle with the government before he was interviewed under oath.

The consent decree followed other documented problems at Rhino, which at the end of 2011 operated 11 mines in four states, with a total of more than 1,000 workers. One mine, also near Bolt, was hit in 2010 with a “pattern of violations” letter from the mining agency, a sanction that according to the agency’s website is “reserved for mines that pose the greatest risk to the health and safety of miners, particularly those with chronic violation records.”

A few months later, rock from a wall in the same mine pinned and killed a miner. The mine was given a second “pattern of violations” letter, with the safety agency finding that the company had not maintained the safety improvements it made after the first letter.

In another instance, government regulators accused the company of alerting miners underground of an imminent agency inspection, which would have allowed workers to clean up any potential violations.

A review of regulatory filings by The Charleston Gazette-Mail found that during his career Zatezalo was listed as director of mining operations or as mine general manager during accidents that resulted in three mining deaths. He was a top officer at the time of a fourth death.

During a Senate confirmation hearing earlier this month, Zatezalo acknowledged that at times his local managers were “not doing what they should have been doing” and that in those cases, he replaced them. He said that if he was confirmed he wouldn’t weaken mine regulation.

“Inspections in the mines in the United States are a necessity,” he said.

Zatezalo began his mining career as a union laborer, before rising in the ranks to hold top positions at American Electric Power Coal and Rhino. He also helped lead coal advocacy associations in Ohio and Kentucky.

Zatezalo was not widely known nationally before he was nominated. In an interview with his hometown newspaper in Wheeling, West Virginia, Zatezalo said that industry contacts had urged him to come out of retirement and put his name in the running for the post. Among his backers, he said, were Robert Murray, the influential chairman of mining giant Murray Energy.

“There aren’t a lot of people in the industry I don’t know, and people said, ‘You’d be great for that position. I’m going to call Sen. (Mitch) McConnell and tell him he needs to support you for this,'” Zatezalo recalled.

Zatezalo later clarified and said he was not sure if Murray had lobbied on his behalf.

Jagodzinski, the mine foreman at the center of the government’s discrimination suit, said he has been stigmatized after being falsely fired for sexual harassment, and has had difficulty finding steady employment since.

“They ruined me, dude. I’ve lost everything,” he said in an interview. “And now I see Zatezalo’s going to run MSHA. I cannot believe it.”