JEFFERSON CITY, Mo. — Missouri lawmakers passed a bill on Monday that makes it tougher to prove workplace discrimination in court — a move that some lawmakers and the NAACP slammed as an assault on worker protections.

The bill would require people suing for workplace discrimination to prove that a protected class such as race, gender, age or ability was “the motivating factor” for disciplinary action from an employer.

Under current law, employees must only prove that their protected class contributed to an employer’s decision to fire, discipline or refuse to hire them.

The legislation also sets caps for the amount of damages an employer must pay based on the size of the company.

The House voted 98-30 to pass the measure, and it will soon go to Gov. Eric Greitens, who is likely to sign it.

“It is important that we create an environment where businesses can thrive,” Greitens told the Associated Press.

“The work that trial lawyers have been doing for a long, long time has held Missouri back, and so we’re committed to fixing that.”

Critics of the bill argued for nearly seven hours on Monday that the new rules would make Missouri’s standards among the strictest in the nation.

“This is wrong,” said Democratic Rep. Bruce Franks Jr., after reading a series of racial slurs cited in a pending case against Republican Sen. Gary Romine’s rent-to-own business. Romine is the bill sponsor.

“The judicial system looks a little bit different when you look like me,” said Franks, who is black. “This bill is not acceptable — the fact that we’re even speaking about this is even a problem.”

Romine has repeatedly contended that the new bill wouldn’t affect the case and that he had proposed similar measures before the lawsuit was filed.

Republican Rep. Joe Don McGaugh said the bill would correct “judicial overreach” that for years has discouraged businesses from coming to the state. And business groups such as the Missouri Chamber of Commerce and Industry say it would cut down on “frivolous lawsuits” in state courts.

Representatives on Monday proposed several amendments to fix what some called drafting errors in the language of the proposal. All of the changes were struck down.

Republican Rep. Jay Barnes argued that portions of the bill could restrict protections for medical professionals who refuse to participate in abortions, remove security for some whistleblowers that expose illegal activities at work and prevent some individuals from being held accountable for sexual harassment.

But supporters of the bill urged lawmakers not to pass any changes, saying that amendments could jeopardize its passage. Lawmakers have until Friday to pass legislation and send it to the governor. An amended bill would have to go back to the Senate and likely faced a Democratic filibuster.

Associated Press reporter Summer Ballentine contributed to this report.