WASHINGTON — The prospects for Senate approval of a broad overhaul of the nation’s immigration laws improved on Thursday after two Senate Republicans worked out a deal on a plan to strengthen border security with the bipartisan group of eight senators that drafted the original bill, raising hopes that the new agreement could build Republican support for the immigration legislation.

The deal calls for a “border surge” that nearly doubles the current border patrol force to 40,000 agents from 21,000, as well as for the completion of 700 miles of fence on the nation’s southern border. The additional border agents, the senators said, would cost roughly $25 billion.

Senator Bob Corker, Republican of Tennessee and one of the deal’s architects, said he expected that his provision could attract the support of roughly 15 Republicans for the legislation, which includes a pathway to citizenship for the 11 million unauthorized immigrants already in the country. Those Republican votes would be a significant boon to the measure, which backers hope to push through the Senate by the end of next week.

If nearly all Senate Democrats vote for the bill, as aides now expect, the additional Republican support would not only ensure the bill’s passage through the Senate, but that it passes with nearly 70 votes and bipartisan momentum as it heads to the Republican-controlled House.