Chicago Mayor Rahm Emanuel is warning Democrats that if they pursue a far-left agenda, the result could be President Donald Trump's re-election.

In an op-ed for The Atlantic on Sunday, Emanuel said that despite Trump's apparent vulnerability in the polls, "Democrats can’t bank on voters being more dismayed by him than they are enamored of us."

He said Trump has made it clear that his 2020 campaign will be centered on painting Democrats as socialists in order to scare "swing voters out of the Democratic fold."

"If Trump’s only hope for winning a second term turns on his ability to paint us as socialists, we shouldn’t play to type," he warned Democrats.

Emanuel, who served as President Barack Obama's first White House chief of staff, is far from the first political observer to predict that a leftward turn could hurt Democrats' 2020 prospects. But as the chairman of the Democratic Congressional Campaign Committee when the Democrats took control of Congress in 2006, Emanuel's advice may carry added weight.

After initially saying he planned to run for a third term as mayor, Emanuel announced in September that he would be stepping aside. A run-off election to determine his successor is scheduled for April.

"The last thing we should do is serve him slow pitches over the plate that allow him to define us on his terms," Emanuel said. "Unfortunately, that’s exactly what Democrats have been doing since he went before Congress in early February. It’s almost as if we’ve been duped into reading from his ready-made script.

"Earth to Democrats: Republicans are telling you something when they gleefully schedule votes on proposals like the Green New Deal, Medicare for all, and a 70 percent marginal tax rate," he said.

Progressive Democrats like Rep. Alexandria Ocasio-Cortez, D-N.Y., have advocated for such policies, and many of the announced 2020 Democratic primary contenders have announced support for one or more of those policies.

Emanuel went on to say that Democrats should not "abandon our priorities" such as battling climate change and making health care more accessible. But he pointed to polls that have shown voters care more about electing someone who can defeat Trump than about ideology.

Some political observers have said Ocasio-Cortez and other progressive congressional Democrats are driving a rift within the party. They point to the debate over the ambitious proposals in the Green New Deal and the divided responses to Rep. Ilhan Omar's controversial comments about Israel.

Emanuel said Democrats will have to put aside those ideological difference to succeed.

"The president’s low approval ratings suggest that, if he wins a second term, Democrats will have no one to blame but ourselves," he said.

"As Democrats, our first, second, and third priorities should be to produce a candidate who will appeal to the widest swath of both moderate and progressive voters. Until January 21, 2021, we need to make sure that everything else is set aside."