Following President Donald Trump’s roundly criticized performance alongside Russian President Vladimir Putin in Helsinki on Monday, a bipartisan group of senators is moving closer to taking key intelligence powers out of the president’s hands.

At work is a piece of legislation that would trigger automatic sanctions if Russia or any other country is found to be interfering in future American elections. Specifically, the bill would empower the director of national intelligence—not the president—to make that determination.

Dubbed the DETER Act, the bill was introduced earlier this year by Sens. Marco Rubio (R-FL) and Chris Van Hollen (D-MD). Before Monday, it was gaining little traction. But that began to change amid Trump’s continued reluctance this week to fully embrace the U.S. intelligence community’s findings on Russian election-meddling. Lawmakers, Rubio reasoned, could help ensure that Russia will shy away from meddling in future elections if it was understood that a unified Congress would overrule the president’s equivocations.

“Before [Putin] even does it, he has a very clear understanding of what the price is going to be,” Rubio said of his bill. “Men like Vladimir Putin operate as cost-benefit analyzers. … He’ll do it again if he doesn’t think the costs are high enough.”

The DETER Act faces hurdles before passage, chief among them that Trump would have to sign the bill into law—something he would likely balk at, as it deprives him of major intelligence authority. Still, it represents one of the more firm congressional responses—as it is neither a non-binding resolution nor a symbolic rebuke of the president—to Trump’s continued skepticism of the American intelligence community’s assessment of Russia’s election meddling.

That skepticism continued on Wednesday, when the president again appeared to contradict Dan Coats, his director of national intelligence, who said just last week that “the warning lights are blinking red again” when it comes to Russian cyberattacks. During remarks at the White House, Trump said “no” when asked if Russia is still targeting the U.S., baffling lawmakers and even his own staffers. His press secretary, Sarah Sanders, later insisted that he was simply waving off the questions that reporters were shouting at him.

Rubio’s and Van Hollen’s legislation stipulates that once the DNI determines that a country is interfering in U.S. elections, some of the toughest sanctions to date would be put into place on key sectors of the Russian economy. Those penalties include a provision that would bar “every senior Russian political figure or oligarch” named by the Treasury Department earlier this year from entering the U.S. Their financial assets will also be blocked.

The bill’s proponents are confident that, unlike past efforts aimed at handicapping the president's authority, the DETER Act actually has a chance of passage. Their optimism is owed, in part, to the fact that Senate Majority Leader Mitch McConnell (R-KY) mentioned the legislation unprompted during his weekly press conference.

“There’s a possibility that we may well take up legislation related to this,” McConnell said. “In the meantime, I think the Russians need to know that there are a lot of us who fully understand what happened in 2016, and it really better not happen again in 2018.”

The White House did not immediately respond to a request for comment.

Democrats praised the legislation, too, but they argued that it alone would not be enough. Senate Democratic leaders have outlined a separate set of demands that are unlikely to be met; specifically, they called on Republicans to bring top officials to Capitol Hill to answer questions about what Trump discussed during his one-on-one meeting with Putin. They also requested a hearing with the American interpreter who was in the room during that meeting.

For now, though, Democrats are accepting the reality that the Rubio-Van Hollen bill may be the only way that Congress will formally respond to Trump-Putin summit.

“We’re kind of in uncharted territory where we’ve got someone who is acting so irresponsibly in a way that’s got so many national and international consequences that Congress has to act to, in a sense, restrain this president’s flexibility because we can’t trust what he says or what he does,” Sen. Mark Warner (D-VA), the vice chairman of the Senate Intelligence Committee, told reporters.

Senate Minority Leader Chuck Schumer (D-N.Y.) indicated that he, too, supports the bill. Schumer told reporters on Tuesday that he spoke with Coats just hours after Trump’s press conference alongside Putin. He declined to reveal details about their conversation.

The bill would have to go through the Senate Banking Committee, which has jurisdiction over sanctions legislation. Sen. Mike Crapo (R-ID), who chairs the committee, would not comment specifically on the DETER Act but said he supports more sanctions on Russia. Van Hollen told The Daily Beast that he spoke with Crapo on Wednesday about the bill.

“It’s fair to say he’s positive about finding a way forward,” Van Hollen said. “I think it’s going to be hard for anybody to explain why they would not want to penalize Russia if Russia, again, interferes in our elections.”

Rep. Ileana Ros-Lehtinen (R-FL) introduced a similar measure in the House. And the goal in both chambers is to build enough support for the bill so that it could pass with veto-proof majorities.

The strategy has worked in the past. Last summer, Congress sent a robust Russia sanctions regime to the president’s desk that he and his administration vigorously opposed—but Trump signed the legislation because it passed 98 to 2 in the Senate and 419 to 3 in the House.

Sen. Lindsey Graham (R-S.C.) said on Wednesday that he would introduce legislation that goes even further than the Rubio-Van Hollen bill. Graham, a longtime Russia hawk, wants to impose those sanctions immediately and only ease them if Coats determines that Russia’s active measures to interfere in U.S. elections have stopped.

“I’m going to tell Mitch McConnell that he needs to get with Schumer and knock off the partisanship and put team America on the field,” Graham said. “Doing nothing is political malpractice. This is a 9/11-type scenario that we can actually prevent.”