SHALER, Pa. — This should be an upbeat moment for Pennsylvania Democrats, desperate to deprive President Trump of a second term.

In elections last year, two Trump-like Republicans running for governor and senator lost to Democrats by blowout margins. Four Democrats wrestled away Republican-held congressional seats, including Conor Lamb, whose victory here outside Pittsburgh seemed to be a template for how to win back voters in Trump country.

But, listening to strategists and voters in a critical state for Democrats, the midterms feel like a long time ago. Instead, there are widespread worries that the momentum in Pennsylvania, and in other key Rust Belt states, could screech to a halt if the issues in the 2020 presidential primaries and the party’s eventual nominee stray too far left for the region’s many centrist voters.

[Make sense of the people, issues and ideas shaping American politics with our newsletter.]

“The more we have presidential candidates or newly elected congresspeople talking about the Green New Deal, talking about ‘Medicare for all,’ talking about socialism, the more that plays into the Trump campaign’s hands,” said Ed Rendell, a former Pennsylvania governor and national Democratic chairman.