TOPEKA, Kan. (AP) — A proposal designed to thwart investing that considers environmental, social and governance factors has cleared the Kansas Legislature, but divisions within its GOP majorities kept the measure from being as strong as some conservatives wanted.

Lawmakers on Thursday approved a bill that would prevent the state, its pension fund for teachers and government workers and its cities, counties and local school districts from using ESG principles in investing their funds or in awarding contracts. Such investment strategies have become the target of GOP lawmakers across the country who argue they are focused more on pushing political agendas rather than earning the best returns.

At least seven states, including Oklahoma, Texas and West Virginia, have enacted anti-ESG laws in the past two years. GOP Govs. Ron DeSantis of Florida and Greg Gianforte of Montana also have moved to ensure their states’ funds aren’t invested using ESG principles.

Some conservatives lawmakers in Kansas wanted to require managers of private funds to either disclose to clients that ESG principles guide their investing or to get clients’ written consent to use ESG. Republican state senators backed a plan to force the state pension fund to divest from nations identified by the U.S. government as foreign adversaries, including China.

But proposals to impose new rules for private money managers spurred a strong backlash from influential business and banking groups. House members said the provision requiring the pension fund to divest from other nations was written so broadly that it would prevent investing in companies founded by immigrants fleeing oppression.

“We right here wanted to focus on what we control — state pensions, state investments, government contracts, stuff like that,” said Republican state Rep. Nick Hoheisel, of Wichita, chair of the House committee handling the legislation.

The votes to approve the bill were 76-47 in the House and 27-12 in the Senate and sent the measure to Democratic Gov. Laura Kelly. While almost all of the state’s Democratic lawmakers voted “no,” Kelly has not said what she will do. Supporters had the two-thirds majority needed to override a veto in the Senate, but not in the House.

“It’s still a panicked response to a fake issue that’s been created by right-wing media,” said state Rep. Rui Xu, a Kansas City-area Democrat.

About one-eighth of U.S. assets being professionally managed, or $8.4 trillion, are being managed in line with ESG principles, according a report in December from US SIF, which promotes sustainable investing.

Supporters of ESG principles in investing argue that it’s financially more prudent to consider issues such as whether a shift to green energy makes investing in fossil fuel companies riskier. Last month, hundreds of investors, companies and institutions signed on to a “Freedom to Invest” statement arguing that ignoring “the robust economic benefits” of clean energy represented a failure to build a stronger economy.

“Climate change poses a threat to the safety of our communities and the long-term value creation of the economy, and addressing its risks upholds investors’ fiduciary duty,” the statement said.

Xu said that even the mildest version of the bill still would hinder cities and counties when awarding contracts. Hoheisel said he’s not worried about it being a problem.

Across the U.S., the criticism of ESG from Republicans has sometimes been heated.

Last month, 19 GOP governors, including DeSantis and Kristi Noem of South Dakota, issued a joint statement calling ESG a “direct threat to the American economy, individual economic freedom, and our way of life.” And Utah’s Republican state treasurer told a GOP gathering that ESG “opens the door to authoritarianism” and is “Satan’s plan.”

Kansas state Sen. Mike Thompson, a conservative Kansas City-area Republican and chair of the Senate committee handling the legislation, backed the provisions on private managers and investments outside the U.S.

While he wouldn’t go as far as the governors or Utah treasurer, Thompson argued that pushing investors away from lumber, mining, agriculture or fossil fuel companies harms industries critical to the economy and hurts national security.

Still, most of the Kansas debate centered on whether investment earnings drop when managers use ESG principles.

Kansas State Treasurer Steven Johnson, who supports the bill, said: “We’re interested in the highest and best return for Kansas.”