TEL AVIV – In a surprising move, the details of which are only now emerging, Russian President Vladimir Putin reportedly came to Prime Minister Benjamin Netanyahu’s aid in blocking an Obama-led U.N. resolution against Israel in the waning days of his presidency.

The resolution called for a peace treaty between Israel and the Palestinians, catering primarily to the Palestinians and “very far from the [current] Trump plan,” a source said.

In December 2016, U.N. Security Council Resolution 2334 condemning Israeli settlements and designating the Western Wall and the Old City of Jerusalem as occupied Palestinian territory passed, with the U.S. abstaining instead of vetoing. The Jerusalem Post cited Israel’s Ambassador to Washington, Ron Dermer, as saying he has evidence that the Obama administration pushed the resolution forward, something his American counterpart at the time, Dan Shapiro, denies.

Netanyahu appealed to then-president-elect Donald Trump to try to block Resolution 2334. During those efforts, an Israeli source told the Post this week, Israeli Ambassador to the U.N. Danny Danon discovered that a second — potentially more explosive — anti-Israel resolution was on the way.

That resolution would have imposed parameters for a peace agreement that was bias towards the Palestinians and would include a Palestinian state based on pre-1967 borders.

Indeed, at the time, journalist David Ze’ev Jablinowitz spoke to President Barack Obama who confirmed that part of the story. Jablinowitz recounted that the then-president told him he “had a resolution in the works that would set the parameters for an Israeli-Palestinian final-status agreement that would include a Palestinian state and would include a time frame by which such talks should be completed.”

“The impression I got from him was that he wanted to show he was a friend of Israel but [the resolution] was all about Netanyahu and the right-wing,” Jablinowitz added.

The transcripts of declassified phone conversations — obtained by Israeli daily Israel Hayom — between Trump’s former adviser Michael Flynn and Russia’s then-ambassador to the U.S. Sergey Kislyak, indicate that Netanyahu had convinced Putin to threaten a veto should the vote go forward and the Russian leader agreed. That being the case, the resolution was never put forward to the Security Council since it had no chance of passing.

Kislyak called Flynn days after the anti-settlement Resolution 2334 passed.

“Since you were interested in the issue of the Middle East and you called me on that issue,” the Russian envoy said, “we wanted to convey to you and through you to the president-elect that we have significant reservations about the idea of adopting now the principles for the Middle East that our American colleagues are pushing for.”

“So we are not going to support it in the quartet or in the Security Council, and we have conveyed [that] to our American colleagues,” he added, later reiterating, “It’s not something that we – Russia – are going to support.”

Flynn replied, “Okay, that’s good.”

According to the Post, the newer resolution would have paved the way for a General Assembly decision. Netanyahu’s appeal to Putin worked, with the latter expressing disapproval “of the Obama administration making these last-minute moves right before Trump took office,” the report said.

Russian Foreign Ministry spokeswoman Maria Zakharova on Wednesday denied Putin had prevented the resolution from being presented at the Security Council, calling it “disinformation,” “absurd allegations” and “absolutely fantastic.”

Shapiro also denied it, saying, “I don’t know anything about promises Putin might have made, and I certainly wouldn’t trust him…The idea that Israel had to be rescued by a Russian veto is false.”

According to Israel Hayom, Netanyahu had told the full story, including Putin’s involvement, “in a closed meeting” this week.