Remember when the new Germany was keen to put its historical baggage behind it and be Israel’s best friend in Europe?

That was then. Now Berlin is set to block a historic chance for raising the Jewish state’s international profile.

The issue is a fight for seats on the top UN body, the Security Council. Germany, a major UN donor, mover and shaker, serves on it often. Israel, frequently singled out for international criticism, never has. Until now, in fact, Israel was the only UN member who wasn’t eligible for a seat.

But now it is, and in June UN members will choose which countries will take two available council seats next year: Germany, Belgium or Israel. Needless to say, Jerusalem is least likely to win.

Here’s how it works: Regional groups present candidates for approval by all UN members. But after joining the UN in 1949, Israel was its only member rejected by all regional groups, especially the one dominated by its warring neighbors. Like Rodney Dangerfield, it got no respect from any Turtle Bay clubs.

So it set eyes on a UN bloc known as the Western Europeans and Other Group. Besides democracies west of the Berlin Wall, WEOG includes Australia, Canada and America.

In late 1990s, one of America’s most astute modern diplomats, then-UN ambassador Richard Holbrooke, finally succeeded in adding Israel to the group. To placate Israel’s critics, Israel’s candidacy for UN bodies would be phased in slowly — it would have to wait two decades before being eligible for a council seat. As a good-faith gesture, the group promised Israel that it and Belgium would run uncontested for the two open 2019-20 seats.

Then, in 2016, Germany announced it would also run — even though it already served as a council member as recently as 2011-12.

“We run every five years, so the Israelis shouldn’t be surprised,” Berlin’s then-foreign minister, Frank-Walter Steinmeier, told me at the time.

The Israelis said they were surprised, and understandably sore about Berlin’s abrogration of Holbrooke’s assurances.

When there is any real competition for a council seat, countries lobby furiously. Now, as the June election approaches, Germany and Belgium have been wining and dining UN ambassadors from key voting countries, hosting lavish receptions and briefing reporters on what they’ll do as council members.

Knowing its vulnerabilities, Israel mostly conducts its campaign behind the scenes, hosting decision makers from key voting countries in Jerusalem, and even leaning on Arab allies for support in the General Assembly’s secret ballot.

Last week, President Trump’s nominee to serve as US ambassador to Germany, Richard Grenell, a former spokesman for several Republican ambassadors at the United Nations, tweeted his support for Israel. He urged Democrats and Republicans to back the isolated Mideast ally and fulfill a two-decade-old promise.

But Germany is unlikely to withdraw. So, unless Belgium yields, Israel’s hopes for UN respect seem doomed for now — and maybe for the foreseeable future.

Why? Diplomats have been telling me Israel violates too many Security Council resolutions to be a member — as in the one passed during the last weeks of Barack Obama’s presidency, which marked Jewish holy sites as occupied Palestinian territory.

But is building a porch in Maale Edumim really such a huge threat to world peace?

How about, then, a report released last week by UN experts on the Security Council’s North Korea sanctions? It found Germany violated a council ban on sparkling wines, exporting $151,840 worth of bubbly and other luxury goods to Kim Jong-un’s cronies. Or how about, as the Jerusalem Post’s Benjamin Weinthal reports, German companies exporting to Iran banned materials that were later used in chemical attacks in Syria?

Never mind. Germany (and Belgium) will surely benefit from the UN’s habit of magnifying Israel’s violations beyond all proportion. Thus, Israel’s petition to join the most prestigious UN club will likely be rejected, thanks to a late entry by a shameless, clueless, cynical German power play against the Jewish state.