As senators deliberate over legislation to impose new sanctions on Russia, former government officials warned against any action that would harm European allies that rely on gas imports from Russia.

“It’s very difficult with some of the bills that have been laid out to only punish Russia without punishing our European friends,” said Senate Foreign Relations Chairman Bob Corker, R-Tenn., at a Wednesday hearing on the importance of NATO.

At least three pending Senate bills would impose sanctions on Russia’s energy sector — either to punish it for the 2016 U.S. election interference or to deter it from conducting similar interference in the future. Corker said it’s possible one of the bills to further sanction Russia could pass this fall.

But finding a way to decisively punish and deter Russia — with energy exports that make up an outsize share of its economy — without hurting Europe is a conundrum for Congress, especially since previous rounds of targeted sanctions on Russian individuals have not stopped Moscow’s behavior. Europe relies heavily on imports of Russian natural gas.

Corker’s committee is considering legislation from ranking member Robert Menendez, D-N.J., and Lindsey Graham, R-S.C. that would sanction foreign investment in energy projects supported by Russian state-owned firms. The bill contains provisions dealing with foreign policy, weapons of mass destruction and cybersecurity. The legislation is considered the most likely sanctions vehicle to move this Congress.

A separate bill before the Senate Banking Committee from Sens. Marco Rubio, R-Fla., and Chris Van Hollen, D-Md., would order strong sanctions on some of Russia’s largest energy companies if any further election interference occurs.

President Donald Trump’s withdrawal last year from the Paris climate agreement, his reimposition this spring of nuclear sanctions on Iran, and his attacks on specific European allies adds to senators’ heightened sensitivity to Europe.

When coupled with Trump’s repeated criticisms of NATO, imposing sanctions on Europe’s energy supplies would be like throwing salt on an open wound, witnesses told the committee.

“I would not support sanctions against European allies,” testified Nicholas Burns, a former ambassador to NATO, adding he supports Trump’s criticism of Europe’s reliance on Russian energy imports. “We’ve got to work with them on lots of other issues.”

At the heart of U.S. concerns is Germany’s plans to build the Nord Stream 2 pipeline to Russia, which could dramatically increase imports of Russian natural gas to the European Union, giving Moscow considerably more leverage over the bloc. The Trump administration has threatened to sanction the pipeline but what Congress is contemplating would go beyond threats. The project is also opposed by nearly half of EU member states.

Sen. John Barrasso, R-Wyo., introduced legislation in July that would order sanctions on any company involved in the Nord Stream 2 project.

“We weaponized too much foreign policy with tariffs and sanctions,” Richard Haass, a former senior U.S. diplomat and president of the Council on Foreign Relations, told the committee. “I just think we are overloading the circuits of U.S. and European relations.”

Sen. Cory Gardner, R-Colo., a co-sponsor of Barrasso’s legislation, said he was sympathetic but only to a point.

“At some point, we have to get somebody’s attention as we are explaining to the American people why billions of dollars of U.S. taxpayer dollars go to this very important security alliance,” he said.

Haass and Burns suggested it would be better to pass new sanctions on Russian oligarchs close to President Vladimir Putin or impose sanctions that would reduce Russia’s access to the U.S.-dominated international financial system.

Corker said the Senate probably has just three weeks left to pass a sanctions bill to deter Russia from further election interference. “We’re probably going to settle this issue in the next three weeks,” he said.

If Russia is shown to have interfered in the 2018 midterms, he later said, “there will be a brutal sanctions bill passed, which may be the best way to deal with it.”

The chairman said he was open to all sorts of ways of punishing Russia “unless we’re hurting our friends” in Europe.

Menendez said he considered his bill an “open-salvo” and was prepared to make changes to it to accommodate European concerns.