An election bill moving through the Republican-led Legislature would rewrite the rules for a single race: the looming battle against Senator Jon Tester, a Democrat.HELENA, Mont. — Republicans typically cry foul when accused of rewriting election laws to benefit their candidates. But as the Montana Legislature debates a new voting bill, even some G.O.P. lawmakers concede that this one appears designed to help them win elections — more precisely, one very important election.The bill would rewrite the rules for the state’s next U.S. Senate race and only that race. The 2024 fight to oust Senator Jon Tester, a Democrat, is expected to be one of the tightest in the country.The legislation would shift the contest from a traditional election into a “top two” primary system, making it exceedingly difficult for third parties to reach a general election ballot. Some believe the system would keep the state’s vibrant Libertarian Party from siphoning votes from the Republican nominee.The 2024 fight to oust Jon Tester, a Democratic senator from Montana, is expected to be one of the tightest in the country.Sarah Silbiger/ReutersWhile supporters of the bill say it makes elections fairer, both Republican and Democratic lawmakers in Helena have claimed that the bill reeks of political interference. Some have chafed at the involvement of Washington operatives, especially allies of Senator Steve Daines. A Montana Republican and head of the National Republican Senatorial Committee, Mr. Daines is leading the party’s campaign to win control of the Senate in 2024.Brad Molnar, a Republican state senator who opposes the bill, criticized Washington meddling in Montana politics, saying that if national Republicans get involved, “we will lose.” He predicted that the bill would backfire on Republicans if angry Libertarians flock to Democrats. “They will be angry. Why wouldn’t they be? I’m not a libertarian, and I’m angry.”The bill’s sponsor, State Senator Greg Hertz, said he was trying to ensure that Montana’s senator would win with more than 50 percent of the vote and to also tamp down on parties’ interference with third-party candidates.Mr. Hertz said he had designed the bill to apply only to the upcoming Senate race because he saw it as a test run. He expected the Legislature to examine expanding the system to congressional, state legislative and other statewide races in the future.The system would mirror California’s primaries, where all the candidates from all the parties appear on the same ballot, and the top two vote-getters face off in the general election.The bill passed the Montana Senate last week by a narrow margin, with seven Republican senators voting against it. A House committee will hold a hearing on the bill on Friday.State Senator Greg Hertz, the bill’s sponsor, says he was trying to tamp down on parties’ interference with third-party candidates.Janie Osborne for The New York TimesMultiple former Republican officials are expected to testify against it. The Libertarian Party has also been organizing opposition to the bill. The state’s Republican governor has not weighed in.But the forces crafting the bill and pushing it through are powerful.Chuck Denowh, a lobbyist who worked for Mr. Daines’s 2020 campaign and has ties to the Montana Republican Party, has been working closely with Mr. Hertz. At one point he suggested critical changes that focused the bill on Mr. Tester’s race, according to emails reviewed by The New York Times.“We would like it to apply only to United States Senate races,” Mr. Denowh said in an email sent on March 26 to multiple lawmakers, including Mr. Hertz. “We’d like a sunset in 2025,” he added. It was not clear whom “we” was referring to, and Mr. Denowh declined to answer questions.Mr. Hertz quickly agreed with the changes and asked State Senator Steven J. Fitzpatrick, the House majority leader, who was copied on the email chain, to make the newly reworked proposal “a priority bill.”The sudden changes and swift reintroduction after an initial failure in committee caught Republican lawmakers by surprise.In a text message chain among eight Republican senators, Mr. Fitzpatrick answered lawmakers’ concerns by telling them the bill “came from Daines” and that it was the “brainchild of the Jason Thielman,” according to screenshots of the texts obtained by The New York Times. Mr. Thielman is a longtime Daines aide who is now the executive director of the N.R.S.C.“No wonder I don’t like it,” responded Senator Dan Salomon, a Republican state senator who voted against the bill.When asked about the text messages, Mr. Fitzpatrick said that he had never spoken directly with Mr. Daines about the bill, but that he believed the effort originated with national Republicans.Mr. Daines has not weighed in publicly. Rachel Dumke, a spokeswoman for Mr. Daines’s office, declined to comment.At least two Republican lawmakers in Montana said they had been pressured by Mr. Daines’s office to support the bill. And one Republican state senator received a text message from state Republican Party officials explicitly saying the bill was needed to defeat Mr. Tester. The lawmakers asked for anonymity to disclose private discussions.In an interview, Mr. Hertz said he had been working on election issues since last September, initially exploring adding a runoff election. But he acknowledged that his efforts seemed to gain national interest when he zeroed in on the Senate race.“Yeah, I heard from a lot of people in D.C. at that point in time,” Mr. Hertz said. He added that he hadn’t spoken with Mr. Daines personally but had spoken with Mr. Thielman repeatedly about the status of the bill.A spokesman for the N.R.S.C., Mike Berg, declined to comment on Mr. Thielman’s involvement.“The optics of the situation, I felt, were bad … I want to do it across the board,” said Jason Small, a Republican state senator who voted against the bill.Janie Osborne for The New York TimesMr. Hertz said that he thought the changes would help third parties. “This gives them an opportunity in the primary to win more votes. And if you have enough support, you will end up on the general ballot, and that will give you an opportunity to make your case to the voters of Montana.”A spokeswoman for Gov. Greg Gianforte declined to respond to questions, pointing to the governor’s brief statement at a news conference on Thursday.“A number of other states have tried things like this,” Mr. Gianforte said. “I think it’s kind of an interesting idea, but we won’t take a firm position until we actually see the final legislation.”Some Republican lawmakers who were supportive of the idea of a top-two election system balked when they saw that the proposal had been amended to apply only to the 2024 Senate election.“If we’re going to do a top-two primary, I’m all for it. I think it’s wonderful,” said Jason Small, a Republican state senator who voted against the bill. “The optics of the situation, I felt, were bad if we’re going to just single out one particular race and try it there. I want to do it across the board.”Some Republicans in the statehouse noted that the bill might not have much of an impact on the outcome. They cited a recent study by the election website FiveThirtyEight that found that Mr. Tester was likely to have prevailed in all of his elections even if the Libertarian candidate hadn’t run.The Tester campaign accused Montana Republicans of attempting a power grab.Republicans are “trying to change local election laws to look more like California’s in an attempt to gain political power for themselves,” said Shelbi Dantic, a spokeswoman for Mr. Tester’s re-election campaign.So far, no front-runner has emerged to challenge Mr. Tester in November. Republicans in Helena expect Representative Matt Rosendale, a conservative who voted to overturn the 2020 presidential election, to explore a run. Tim Sheehy, a wealthy businessman and military veteran, is being recruited by some Republicans in Washington to run, as first reported by Axios, though he has not made any formal announcement.As news about the bill spread around the state, Republican lawmakers said they were receiving calls and texts from constituents claiming an unease with the bill. Senator Jeff Welborn, a Republican state senator, noted that the complaints weren’t coming from just Democrats.Mr. Welborn said that he had received multiple text messages, including one from a constituent who said the bill amounted to election interference. “This guy also has Republican candidate signs in his yard,” Mr. Welborn said. “He saw this as a really, really bad look on Montana as a state for trying this one on.”Former Republican leaders in the state have also been vocal in their opposition.“It’s a horrible commentary about how you value the votes of your fellow citizens,” said Marc Racicot, a former Republican governor and former chair of the R.N.C. “They didn’t sign up as guinea pigs.”Republicans in favor of the bill said that they believed it would cut down on the interference by major parties with third-party candidates. In the past, Democrats have attempted to promote Libertarian candidates to try and divert votes from Republicans, and Republicans have fought to get Green Party candidates on the ballot to try and draw support away from Democrats.“I think at least with the top-two primary you eliminate some of that nonsense,” Mr. Fitzpatrick said, adding, “It’s dirty politics at its worst.” More