WASHINGTON — Senators, looking toward November’s elections after a bruising Supreme Court fight, reached an agreement on Thursday to leave the Capitol for the campaign trail.

Republicans exacted a steep price from Democrats for an arrangement that will free up senators through Election Day: In a flurry of votes late Thursday, they pushed through 15 more judicial nominees, including three appeals court judges, on an expedited basis. In doing so, they added an exclamation mark to their victory in muscling through a second Trump Supreme Court justice, and deepened a historic imprint on the federal judiciary in President Trump’s first two years in office that could push some of the nation’s most important courts rightward for a generation.

Democrats agreed to swallow the additional nominations to free up their vulnerable members to campaign full time for the next three weeks. The party is defending seats in 10 states that Mr. Trump won in 2016, and after a polarizing confirmation fight over Justice Brett M. Kavanaugh, many of those senators are facing greater enthusiasm among Republican voters. Republicans, by comparison, are defending a much smaller number of vulnerable seats, and they had elected to keep the Senate in session later than is typical in an election year.

At least one endangered Democrat, Senator Heidi Heitkamp of North Dakota, was already back in her home state campaigning as senators pushed through the nominees.