The vaunted blue wave that Democrats had hoped for failed to fully materialize on Tuesday night, but the days of one-party control in Washington are now over. President Trump’s strength in rural areas kept the Senate in Republican control, but voters in urban and suburban districts across the country sent the White House a clear message: They want a check on the president.

When the new Congress is sworn in this January, Democrats will be able to curb Mr. Trump’s legislative ambitions and, armed with subpoena power, flex their oversight muscles to initiate investigations into allegations of misconduct by the president and his administration. If the special counsel, Robert S. Mueller III, finds substantial evidence of illegal conduct during the 2016 election, he now will have a receptive wing of government to pursue his findings.

“Tonight, the American people have demanded accountability from their government and sent a clear message of what they want from Congress,” Representative Jerrold Nadler, the New York Democrat in line to be chairman of the House Judiciary Committee, said on Twitter. The president “may not like it, but he and his administration will be held accountable to our laws and to the American people.”

But after eight years in the minority, Democrats hoping to reclaim the White House in 2020 will also have to prove they are interested in governing — and temper the liberal ambitions of the party’s most ardent left-wingers.