WASHINGTON — Republican lawmakers, facing a possible government shutdown in December and the end of one-party control of Congress in January, are searching for a way around President Trump’s demands that they fully fund his wall on the southern border or risk a veto of legislation to keep the government open.

Democrats, buoyed by their midterm success, have little incentive to give the president what he wants unless Republicans are willing to offer significant concessions. And some Democrats hope to attach legislation that would protect the special counsel, Robert S. Mueller III, to one of seven remaining appropriations bills.

The bills, which have a Dec. 7 deadline, would fund a number of federal agencies, including the Homeland Security, Agriculture and Commerce Departments.

Mr. Trump’s lingering threat to veto any bill that does not have billions of dollars in funding for the border wall has raised the tension around what could be routine spending measures. Lawmakers and aides in both chambers say they want to avoid even a partial shutdown, and they do not want to fall back on a stopgap spending bill to keep the government open into the new Congress