Democrats took control of the House on Tuesday night, a victory that will transform a Republican-controlled chamber that supported and protected President Trump into a legislative body ready to challenge and investigate him.

Victories in GOP-held suburban seats around the country gave Democrats more than the 23 seats they needed to retake the majority, giving them control of half of Congress after being locked out of power since Trump took office last year.

They aim to quickly usher in a new era and tone in Washington, starting with a legislative package of anti-corruption measures aimed at strengthening ethics laws, protecting voter rights and cracking down on campaign finance abuses.

“Tomorrow will be a new day in America,” House Minority Leader Nancy Pelosi (D-Calif.) declared from the Democratic Party headquarters in Washington. “It’s about restoring the Constitutions’s checks and balances to the Trump administration. It’s about stopping the GOP and [Senate Majority Leader] Mitch McConnell’s assaults on Medicare, Medicaid, the Affordable Care Act, and the health care of 130 million Americans living with preexisting medical conditions.”

Pelosi promised action on lowering the cost of prescription drugs and rebuilding the nation’s infrastructure, and pledged to pursue bipartisanship where possible.

“A Democratic Congress will work for solutions that bring us together, because we have all had enough of division,” she said.

Trump called Pelosi Tuesday night to congratulate her on her party’s success and acknowledged her call for bipartisanship, her spokesman said.

There are, however, also many points of probable conflict between Trump and the next House: Democrats are likely to launch investigations into numerous aspects of the Trump administration, from its ties to Russia to the president’s tax returns, as well as to step up oversight into Trump’s executive actions on immigration, the environment and other regulations.

“Obviously the country gave us a mandate to provide some check and balance on the executive that that has been sorely missing these last two years,” said Rep. Gerry Connolly (D-Va.). “And that involves rigorous oversight and accountability. ... This is not a time for holding back or being less than vigorous.”

A House takeover amounts to major vindication for Pelosi, who became the first female House speaker in 2006, only to lose the majority in 2010 as voters rebelled against former President Barack Obama's health care law in the first midterm elections of his presidency.

Midway through Trump’s first term, the elections once again focused on health care, only this time Democrats were on the attack against Republicans, attacking the GOP over attempts to repeal the Affordable Care Act and its signature protections for people with preexisting conditions. Republicans who rode their opposition to Obamacare to the House majority in 2010 were forced to backtrack in race after race, insisting that they actually did support such protections.

“Let’s hear it more for preexisting medical conditions,” Pelosi said Tuesday night.

Pelosi will be the favorite to ascend to the speakership once more, though that outcome is not assured, as a number of Democratic candidates distanced themselves from her in the course of the campaign.

Democrats face internal ideological divisions as well. Their restored majority comes thanks to many moderate candidates who beat Republicans in districts that voted for Trump. But the party will also welcome newcomers who ran on distinctly progressive agendas, calling for Medicare-for-all or abolishing the Immigration and Customs Enforcement agency. Those lawmakers include New York’s Alexandria Ocasio-Cortez, who beat longtime Democrat Joseph Crowley in a June primary, and Michigan’s Rashida Tlaib, who is set to claim the seat once held by veteran lawmaker John Conyers Jr. in a deep-blue district.

That mix will be certain to create tensions over the party’s priorities, especially with a restive liberal base that has already begun calling for impeachment proceedings against Trump.

Democrats also failed to take over the Senate, leaving the GOP-controlled chamber as a check against Democrats’ ability to pass partisan legislation through Congress. That could mean an impasse on issues including immigration, gun regulations and health care.

Democrats picked up the seats they need in large part by targeting suburban districts where Trump had grown increasingly unpopular, through a relentless focus on health care and other economic issues. But their message didn’t resonate as widely in rural areas, leaving them short of the massive “blue wave” some in the party had hoped for.

In the eastern suburbs of Denver and in Kansas City and Minneapolis-area districts, GOP incumbents fell to Democratic challengers. All three seats had been heavily targeted by Democrats in 2016, but this year was different.

In Northern Virginia, Republican incumbent Barbara Comstock lost to Democrat Jennifer T. Wexton, while in one surprise win, Democrat Max Rose — an Army combat veteran who focused his campaign on health care and the opioid crisis — unseated Rep. Dan Donovan (R-N.Y.) in a seat encompassing Staten Island and part of Brooklyn. Donovan was the only Republican representing New York City.

In a disappointment for the Democrats, incumbent GOP Rep. Garland “Andy” Barr held off a strong challenge from Democrat Amy McGrath, a former fighter pilot. McGrath raised millions in small donations and rocketed into contention thanks to a viral video introducing her candidacy, but her bid fell short in a district where Trump beat Clinton by 15 percentage points.

Heading into Election Day, Republicans had said their best-case scenario after Tuesday’s voting was a narrower House GOP majority than the 45-seat margin they now command. Republicans had pledged that, if returned to power in the House, they would get to work on a new 10 percent tax cut for the middle class Trump spoke of in the closing days of the campaign.

“We’ve known from the beginning that history was not on our side this election cycle. And the big money was not on our side,” House Majority Whip Steve Scalise (R-La.) said, citing a “motivated base” on the Democratic side who inundated Republican incumbents with small donations to their challengers.

House Republicans also face leadership questions heading into the next Congress, as well as internal ideological differences.

On the GOP side, with House Speaker Paul D. Ryan (Wis.) retiring from Congress, Majority Leader Kevin McCarthy (Calif.) is his likeliest successor as the top Republican leader in the majority or minority. But he may not get there without a fight, since Scalise is also eyeing the job, and Rep. Jim Jordan (Ohio), a leader of the House Freedom Caucus, is the choice of some conservatives.

Despite the strong economy and Republicans’ success in pushing a $1.5 trillion tax cut package into law, those achievements were not central to many GOP campaigns. Instead many Republicans followed Trump’s lead in raising fears about immigrants and crime, while casting Democrats as overly liberal and linking them to Pelosi.

Correction: A previous version of this story incorrectly described Rep.-elect Max Rose (D-N.Y.) and his district. The previous description of Rose as a former boxer mistakenly referred to a Democratic primary opponent, and the district encompasses Staten Island and part of Brooklyn, not Queens.