A divided G.O.P. coalesced behind a bit of legislative extortion: No Ukraine aid without a border crackdown. Now they are split over how large a price to demand, imperiling both initiatives.Senator James Lankford, the Oklahoma Republican and staunch conservative, this week trumpeted the immigration compromise he has been negotiating with Senate Democrats and White House officials as one shaping up to be “by far, the most conservative border security bill in four decades.”Speaker Mike Johnson, in contrast, sent out a fund-raising message on Friday denouncing the forthcoming deal as a Democratic con. “My answer is NO. Absolutely NOT,” his message said, adding, “This is the hill I’ll die on.”The Republican disconnect explains why, with an elusive bipartisan bargain on immigration seemingly as close as it has been in years on Capitol Hill, the prospects for enactment are grim. It is also why hopes for breaking the logjam over sending more U.S. aid to Ukraine are likely to be dashed by hard-line House Republicans.The situation encapsulates the divide cleaving the Republican Party. On one side are the right-wing MAGA allies of former President Donald J. Trump, an America First isolationist who instituted draconian immigration policies while in office. On the other is a dwindling group of more mainstream traditionalists who believe the United States should play an assertive role defending democracy on the world stage.The two wings coalesced last fall around a bit of legislative extortion: They would only agree to President Biden’s request to send about $60 billion more to Ukraine for its fight against Russian aggression if he agreed to their demands to clamp down on migration at the United States border with Mexico. But now, they are at odds about how large of a price to demand.Hard-right House Republicans, who are far more dug in against aid to Ukraine, have argued that the bipartisan border compromise brokered by their counterparts in the Senate is unacceptable. And they bluntly say they do not want to give Mr. Biden the opportunity in an election year to claim credit for cracking down on unauthorized immigration.Instead, with Mr. Trump agitating against the deal from the campaign trail, they are demanding a return to more severe immigration policies that he imposed, which stand no chance of passing the Democrat-controlled Senate. Those include a revival of the Remain in Mexico policy, under which migrants seeking to enter the United States were blocked and made to stay elsewhere while they waited to appear in immigration court to plead their cases.While Senate G.O.P. leaders have touted the emerging agreement as a once-in-a-generation opportunity for a breakthrough on the border, hard-right House members have dismissed it as the work of establishment Republicans out of touch with the G.O.P. base.“Let’s talk about Mitch McConnell — he has a 6 percent approval rating,” Representative Marjorie Taylor Greene, Republican of Georgia, said of the Senate minority leader. “He wouldn’t be the one to be listening to, making deals on the border.”She said that after Mr. Trump’s decisive win in the Iowa caucuses, “It’s time for all Republicans, Senate and the House, to get behind his policies.”As for the proposed aid to Ukraine, Ms. Greene is threatening to oust Mr. Johnson from the speakership if he brings it to the floor.“My red line is Ukraine,” she said, expressing confidence that the speaker would heed her threat. “I’m making it very clear to him. We will not see it on the House floor — that is my expectation.”House Republicans have opposed sending money to Ukraine without a deal on immigration.Emile Ducke for The New York TimesThe situation is particularly fraught for Mr. Johnson, the novice House speaker whose own sympathies lie with the far right but who is facing immense institutional pressures — from Mr. Biden, Democrats in Congress and his fellow Republicans in the Senate — to embrace a deal pairing border policy changes with aid to Ukraine.Mr. Johnson has positioned himself as a Trump loyalist, quickly endorsing the former president after winning the gavel, and said that he has spoken regularly to the former president about the Senate immigration deal and everything else. After infuriating hard-right Republicans on Thursday by pushing through a short-term government funding bill to avert a shutdown, the speaker has little incentive to enrage them again and defy the wishes of Mr. Trump, who has disparaged the Senate compromise.“I do not think we should do a Border Deal, at all, unless we get EVERYTHING needed to shut down the INVASION,” Mr. Trump wrote on social media this week.Democrats already have agreed to substantial concessions in the talks, including making it more difficult for migrants to claim asylum; expanding detention and expulsion authorities; and shutting down the intake of migrants when attempted crossings reach a level that would overwhelm detention facilities — around 5,000 migrants a day.But far-right Republicans have dismissed the compromise out of hand, saying the changes would still allow many immigrants to enter the country each year without authorization.Election-year politics is playing a big role. Representative Bob Good, Republican of Virginia and the chairman of the hard-right House Freedom Caucus, said passing the Senate bill would give “political cover” to Mr. Biden for his failures at the border.“Democrats want to look like they care about the border, then run out the clock so Biden wins re-election,” Mr. Good said. “It would be terrible for the country to give political cover to the facilitators of the border invasion.”Representative Tim Burchett, Republican of Tennessee, said that while Mr. Johnson broke with the right on federal spending because he feared a government shutdown, “I think on the immigration issue, there’s more unity.”Senator John Thune of South Dakota, the No. 2 Senate Republican, warned that the immigration compromise was a “unique opportunity” that would not be available to Republicans next year, even if they were to win majorities in both chambers of Congress and win back the White House.“The Democrats will not give us anything close to this if we have to get 60 votes in the U.S. Senate in a Republican majority,” he said.Speaker Mike Johnson has positioned himself as a Trump loyalist. Kenny Holston/The New York TimesMany mainstream House Republicans believe that Mr. Johnson would be making a terrible mistake if he heeded the advice of the most far-right voices and refused to embrace an immigration deal. They argue that doing so would squander an opportunity to win important policy changes and the political boost that would come with showing that Republicans can govern.“Big city mayors are talking about the same thing that Texas conservatives are talking about,” said Representative Patrick T. McHenry, Republican of North Carolina, a close ally of former Speaker Kevin McCarthy. “Take the moment, man. Take the policy win, bank it, and go back for more. That is always the goal.”But for some Republicans, taking the policy win is less important than continuing to have a political issue to rail against in an election year.“It’s worse than doing nothing to give political cover for a sham border security bill that does nothing to actually secure the border,” Mr. Good said.Mr. Burchett, one of the eight Republicans who voted to oust Mr. McCarthy, rolled his eyes when asked about Mr. McHenry’s entreaties not to make the perfect the enemy of the good.“McHenry’s leaving,” he said of the congressman, who has announced he will not run for re-election next year. More