The next Speaker? Photo: Alex Wong/Getty Images

The 2018 midterms are still a long way off, but President Trump is making it more likely by the day that Democrats can win the 24 seats needed to take back the House of Representatives, a new Cook Political Report analysis found.

The nonpartisan organization changed the predictive outlook of 12 House seats since Cook’s last update, 11 to the benefit of Democrats. It now rates 45 seats as competitive, 36 held by Republicans and nine by Democrats. Democrats would need to win 33 of those races to regain power.

NEW: Ratings changes in 12 districts as Democrats gain momentum



Full story here: https://t.co/bv7dE7sCdh pic.twitter.com/GT4lvAZAdi — CookPoliticalReport (@CookPolitical) October 13, 2017

Conditions are sure to change in those races, and more congressional retirements in both parties are likely, opening seats up for competition. Still, the number illustrates that, even in a favorable political environment, recapturing the House will be no easy task.

It has been made more difficult by electoral trends over the past several years. More and more, Democrats have tended to cluster in cities and well-educated suburbs, leaving wide swaths of the rest of the country with large majorities of Republican voters. Then there’s gerrymandering. Republican-led legislatures have perfected the art of sorting Democrats into districts that give them the least amount of electoral power possible, a practice now being challenged in a hugely significant Supreme Court case. These factors have made it easier for Republicans to maintain a healthy House majority since they swept to power with a 63-seat pickup in 2010.

But Trump’s unpopularity, and the energized Democratic base that is a byproduct of his rise to power, could overcome the obstacles if the conditions are right. An unpopular president tends to drag his party down with him in midterm elections; the president’s anemic approval ratings are currently stuck in the high 30s, down from the mid-40s when he was inaugurated, and they may decline further. Trump’s dangerous behavior has also fired up the liberal base more than anything in recent memory, bringing to mind the Tea Party’s ascension ahead of the 2010 midterms.

“Everything we’re seeking now is a mirror image of 2009,” Dave Wasserman, an editor at the Cook Report, told CNBC’s John Harwood.

There have been four special elections held in deep-red Republican districts in 2017. The GOP has held all four, but Democrats have made it interesting on every occasion, signifying that an animated base exists even in Republican strongholds. Democrats have also won a number of state and local races across the country. And, as Wasserman notes, Trump’s election has inspired a “bonanza” of Democratic candidates competing all over the country, including in districts where the party had failed to even field a candidate in recent years.

If Democrats did win the House, they could grind to a halt any prospective Republican legislation — not that the GOP has been particularly successful on that front lately anyway. Perhaps more important, they could initiate impeachment proceedings, though the prospect of removing the president would still be a steep uphill climb.

Taking back the Senate is a much more daunting task for Democrats, since the map is stacked against them. The Cook Report rates only four incumbent Republicans as vulnerable, whereas there are 13 Democrats running in competitive elections, including red staters like North Dakota’s Heidi Heitkamp and West Virginia’s Joe Manchin. Still, in the context of wave elections like those in 1994, 2006, and 2010, it is common for a rising partisan tide to lift all boats, making the challenge of hanging onto such seats more feasible.