The civil war ripping through the Republican Party is familiar by now. But a similar battle inside the Democratic Party is just starting to emerge. Orthodox liberals are trying to mimic the tea party and impose political correctness on moderate apostates.

They point to the election of two left-wing heroes in deep blue states — Sen. Elizabeth Warren of Massachusetts last year, and Mayor-elect Bill de Blasio in New York last month — as a sign that the party, and the country, is heading their way.

“In our minds, Elizabeth Warren is the North Star to which the entire Democratic Party can look as they seek direction,” Adam Green of the Progressive Change Campaign Committee told Politico. “The wind is at our back.”

If the Democratic Party is foolish enough to listen to such nonsense, they deserve the defeats that will inevitably ensue.

The Republicans provide a stark warning of what happens when an extreme faction dominates a mainstream party. In recent years, the GOP has nominated five hardline conservatives in close Senate races who then lost in the general election.

Primary opponents and voters pulled Mitt Romney far to the right on issues like immigration and helped extinguish his chances of defeating President Obama. At least four senior Republican senators — Mitch McConnell, Lindsey Graham, Thad Cochran and John Cornyn — are being challenged as heretics in primaries next year. Their sin: They dare to talk to Democrats occasionally.

The self-delusion infecting the left is reflected in the numbers. In 2012, only 25 percent of voters identified as liberals while 35 percent called themselves conservatives (41 percent were moderates). In a recent Gallup survey, only 19 percent chose the label “economic liberal;” 41 percent picked “economic conservative”.

Or look at history. Since 1968, Democrats have nominated five northern liberals in the Warren mode (including two from her home state): Hubert Humphrey, George McGovern, Walter Mondale, Michael Dukakis and John Kerry. They all lost.

Before Obama, the only Democrats to win the presidency over a 40-year period were two moderate Southern governors, Jimmy Carter and Bill Clinton. Yes, the president is from Illinois, but he hardly ran as a Warren-type ideologue. Nor has he governed as one, much to the dismay of hardliners that his press secretary once derided as “professional liberals.”

And yet the left is desperate for a candidate to challenge Hillary Clinton, a card-carrying moderate, in 2016. So far, Warren insists she won’t run. But others — including two Vermonters, Sen. Bernie Sanders or former Gov. Howard Dean — could step in if she stays out.

Partisanship and ideology play a vital role in American politics. The problem is when purists turn into bullies — when they want to impose their orthodoxies on everyone else.

The “professional liberals” are not as effective or as organized as the tea party, but they can be just as destructive. In 2010, they supported a left-wing primary opponent against Sen. Blanche Lincoln, a two-term Democrat from Arkansas, whose centrist voting record actually reflected her border state constituents. Lincoln survived the purge but was so bloodied by the battle that she lost badly in November.

Now the “professional liberals” are at it again. Two executives of Third Way, a center-left think tank, wrote an op-ed piece in The Wall Street Journal warning against the “Warren wing of the Democratic party” that indulges in “fantasy-based blue-state populism.”

Liberals immediately demanded that Democrats linked to Third Way denounce the article and sever ties with the organization. This is tea partyism in reverse. And it is just as misguided on the left as on the right.

Obama will be president for three more years, and on at least two important issues, he will have to defy his liberal base to accomplish his objectives. One is trade, where promising agreements that could create thousands of new jobs face staunch opposition from organized labor.

The other is entitlements, which are swallowing a growing chunk of the federal budget and squeezing out spending on other progressive priorities, such as medical research and early childhood education. The president is open to reform, but the “professional liberals” defend every cent of those entitlements, and even want to expand Social Security.

Hard-shell conservatives fantasize that the “Ted Cruz Wing” of the Republican Party will lead them to victory. The loony left is just as misty-eyed about the “Warren Wing” of the Democratic Party.

They’re both wrong. This is a moderate, pragmatic country. Any party that ignores that truth is doomed to defeat.