Between fighting corruption and battling Russian troops and Russian-supported separatists in the Donbas, Ukraine has plenty on its plate already. Despite these burdens though Kyiv also got caught up in one of the final dramas of U.S. President Barack Obama’s presidency.

In an unprecedented move, the U.S. abstained from a recent U.N. Security Council Resolution (Resolution 2334) condemning Israel’s continued expansion of West Bank settlements. 2334 called on Israel to “immediately and completely cease all settlement activities in the occupied Palestinian territory” and declared all Jewish West Bank settlements to be violations of international law. The Resolution was supported by the other fourteen members of the Security Council – including Ukraine.

Israeli Prime Minister Benjamin Netanyahu responded with anger, canceling the trip to Israel his Ukrainian counterpart Volodymyr Groysman in Israel. Although a number of sources – both Israeli and Ukrainian – have battered Kyiv for supporting the Resolution, President Poroshenko made the right decision to support 2334.

First and foremost, Israeli settlements are a clear violation of international law and risk permanently ending any hopes for a two-state solution. Several hundred thousand Israeli settlers now live on the West Bank, creating a complex geographic patchwork of settlements that will eventually end all hope for creating any semblance of a contiguous Palestinian state in the West Bank. While Israel’s future is ultimately its own to decide, Kyiv’s decision on 2334 was both morally and legally correct.

Furthermore, it would be hypocritical of Kyiv to condemn Russia’s annexation of Crimea as a clear violation of international law, while simultaneously appearing to support Israel’s own ongoing international law violations. While the Kyiv-Tel Aviv relationship has blossomed since Ukrainian independence, this does not mean Israel can automatically expect Ukraine to automatically support it on every diplomatic issue the two sides confront.

Finally, President Petro Poroshenko reportedly came under heavy pressure from the U.S. Vice President Joe Biden to support the Resolution. Even if – in a vacuum – Kyiv had wanted to vote against 2334, Ukraine remains highly dependent on American support, and defying Biden’s request would have undermined Ukraine’s own national interests.

Indeed, Israel has not hesitated to prioritize its own security interests when needed. Netanyahu considers maintaining a cooperative relationship with Russian President Vladimir Putin to be a strategic necessity for Israel, and as a result in 2014 abstained from a U.N. resolution condemning Russia for its annexation of Crimea. Given Russia’s growing influence in the Middle East and military presence on Israel’s northern border Netanyahu desire to approach its relationship with Moscow from a realpolitik perspective is understandable. However, Kyiv’s desire to remain in Washington’s good graces is equally understandable as well.

To be clear, Ukraine may still face consequences for its decision to support 2334. For one thing, given Netanyahu’s fit of pique towards Kyiv, it’s not beyond the realm of possibility that further blows to the Israeli-Ukrainian relationship may come. Moreover, a Ukrainian vote against 2334 possessed one particularly strong geopolitical argument in its favor as well: Donald Trump. Trump called upon the U.S. to veto 2334, and a Ukrainian vote against 2334 could have bought Ukraine political capital with the volatile President-elect.

Neither of these arguments though are sufficient to condemn Ukraine’s decision to support 2334. As a Jew and supporter of Israel it pains me to say this, but the fact of the matter is that Israel’s ongoing settlement expansion carries with it enormous risks for the Jewish state. Trump’s support for Israel aside, Tel Aviv’s continued support for settlements in the West Bank carries with it the risk diplomatic of isolation and – ultimately – may force Israel to choose between remaining a democracy or a Jewish state.

Ukraine made the right call to support 2334 – and Kyiv owes no apology for this decision.