President Donald Trump hands Andrew N. Liveris, CEO of Dow Chemical, the pen after signing an executive order about regulatory reform in the Oval Office of the White House February 24, 2017 in Washington, DC.

A widely used farm pesticide the Trump administration refused to ban might get restricted in California.

Environmental activist groups, including the Natural Resources Defense Council and Earthjustice, are fighting to get a ban on chlorpyrifos and claim it can be harmful to children's health and development. The groups were dealt a setback this week when a federal appeals court rejected a petition to force the Trump administration to ban the pesticide.

Dow Chemical is a large producer of chlorpyrifos, which is used in agriculture to control worms and other bugs. The nation's largest agricultural state, though, may step in and take action to further restrict its use.

"[California] is looking closely at this pesticide to see whether further restrictions are warranted," a spokesperson for the state Department of Pesticide Regulation told CNBC this week. The state already requires licensing before using chlorpyrifos.

However, a powerful ag lobby in California is prepared for a fight. California is believed to account for up to 20 percent of the pesticide's use in the U.S.

Among the ag groups supporting chlorpyrifos are the California Farm Bureau Federation, California Fresh Fruit Association, and Western Growers. The American Farm Bureau Federation, the nation's largest ag trade group, also wants to keep the pesticide available to farmers.

"Calls for a ban are not grounded in sound science," CFFA Director of Trade Marcy Martin said in a statement. "Further, unnecessary and unjustified restrictions limiting the utility of chlorpyrifos would disrupt pest management programs and could significantly change general insecticide use patterns and result in significant economic harm to California growers."

Chlorpyrifos is commonly used on almond, walnut, orange and grape crops, although it's also popular for pest control on vegetables such as broccoli.

In March, Trump's Environmental Protection Agency head Scott Pruitt denied a petition from environmental advocacy groups to ban chlorpyrifos. Instead, he moved to continue a review of the pesticide through 2022.

Pruitt's decision marked a reversal from the Obama-era EPA, which appeared prepared to revoke use of the chemical for food crops.

Specifically, Obama's EPA had expressed safety concerns about exposure to the chemical through drinking water, pointing out it relied on its own scientific advisory panel's advice on the matter.

The NRDC, the New York-based environmental group, alleges "exposure to low levels of the pesticide in early life can lead to increased risk of learning disabilities." For example, one study by the University of California-Berkeley documented exposure on children in a farmworker community.

"The evidence is very, very strong and compelling — some of the best of any single pesticide in the world," said Paul Towers, a policy advocate for Pesticide Action Network, a California-based environmental organization.

As part of the effort to get the pesticide banned, NRDC and several other environmental groups sued the EPA a decade ago and started a petition effort that has spanned three presidential administrations.

On Wednesday, the environmental groups suffered a setback when the Ninth U.S. Circuit Court of Appeals, based in San Francisco, ruled against their motion to invalidate Pruitt's action.

In the ruling, the three-judge panel said that the EPA complied with the court's previous orders by issuing its "final response to the petition." Also, the panel found the plaintiffs had yet to exhaust all their options in the EPA's administrative process.

Meantime, California Attorney General Xavier Becerra, along with the attorneys general of six other states, submitted legal objections last month following the EPA's decision not to ban the pesticide. They charge the EPA violated federal law by failing to issue required safety findings on chlorpyrifos.

In an email response Thursday, EPA spokesperson Amy Graham defended the agency's actions on the controversial pesticide.

"The facts are that, despite several years of study, EPA scientists believe the science around chlorpyrifos is unresolved, and that further evaluation of the science should be done," she said. "EPA will make a decision about the registration of the pesticide by the deadline set forth in the law."

Towers, the PAN policy advocate, lashed out at the Trump administration's "cozy relationship with corporations like Dow Chemical." Furthermore, he charged the administration's failure to ban the pesticide reflects "their anti-science agenda."

Dow Chemical is considered a top producer of the pesticide. Dow donated $1 million to the inaugural organizing committee for President Donald Trump. The company's CEO, Andrew Liveris, also heads the Trump administration's American Manufacturing Council, an advisory group.

Liveris was present at a White House ceremony on Feb. 28 where the president signed an executive order to roll back Obama-era government regulations. Trump handed Liveris a souvenir pen after the signing.

"Dow actively participates in policymaking and political processes, including political contributions to candidates, parties and causes, in compliance with all applicable federal and state laws," corporate spokesperson Rachelle Schikorra said in an email statement Friday. "Dow maintains and is committed to the highest standard of ethical conduct in all such activity."

EPA spokesperson Graham dismissed any speculation that EPA head Pruitt reversed course after meeting with the Dow executive. Pruitt, who previously was Oklahoma's attorney general, started his EPA job on Feb. 22.

"The two never had a meeting, they never discussed any substantive issues," Graham said in an email. "They never discussed chlorpyrifos."