The political tidal wave that crashed into Queens Democrats last week may have crested a little short. Or not.

The early returns showed insurgent district attorney candidate Tiffany Cabán with a lead of over 1,000 votes. Later results show organization candidate Melinda Katz clinging to a 20-vote margin. Time for a recount.

Recounts are awful. Patience and thoroughness are necessary just when anger and hope are at a peak. Lawyers pore over ballots seeking to find or excuse minor irregularities. Everyone is sure the other guy is a crook.

I've been in my share, in New York and in Florida for the Bush-Gore debacle, where I lawyered and vote-counted in the famous "hanging chad" fights in Palm Beach County.

The great lesson is that in the end, if the actual vote count is close enough, it is impossible to know who really won.

The Queens fight will turn on two things. First, the New York City Board of Elections will manually recount votes that both sides agree were actually cast. Mistakes in counting happen, and it would be no great surprise if the recount changes the result.

Second, there are about 2,800 "affidavit ballots" that were cast but not counted election night, This happens when a person shows up at a polling place and is told they are not legally entitled to vote. They cast a paper ballot, which is put in a sealed envelope and held for review.

There were about 2,800 affidavit ballots cast, of which only about 500 were accepted. The lawyers will be fighting to allow or disallow the remaining 2,300. There are likely to be more than 20 affidavits that are now accepted. And whatever the result, the loser is likely to take the fight to court.

The winner, sadly enough, may be the side with the best lawyers. Either way, there will be acrimony and bad blood, which no one needs especially in a race for district attorney.

The results themselves were fascinating, regardless of who wins.

Cabán did extremely well in those parts of Queens that are gentrifying. Katz did well in older ethnic neighborhoods. This is the same kind of split we see nationally in the presidential race. It is a cause for both optimism and caution for Democrats everywhere, There is a generational tilt towards Democrats and progressives resting on high-education, tech savvy young people usually called The Insurgency. Everyone else, not so much. African-American and Latino communities, older folks, union members and others are open to new energy and leadership but more cautious. Katz and Joe Biden fill one kind of shoe, Tiffany Cabán and Elizabeth Warren another.

On the issues at stake, The Insurgency has already won, nationally and in Queens — health care, gender equality, compassionate immigration policy are a national mantra. All the Queens district attorney candidates embraced reduced incarceration, bail reform and police reform.

What we have, then, is a good old-fashioned factional fight for dominance. There's nothing new here. The Democratic Party went through the same cathartic war during Vietnam and Republicans just finished theirs in Donald Trump's ascendancy. It's too bad that this gets complicated by a recount, but there will be more of these across New York and the nation as we refresh the democratic process.

Richard Brodsky is a former state Assembly member.