Ukraine has said it’s willing to give up its aspirations to join NATO in return for security guarantees, as part of a peace deal to end the almost four-year war with Russia.

Ukrainian President Volodymyr Zelenskyy offered to drop Kyiv’s NATO dreams during five hours of talks with U.S. officials Steve Witkoff and Jared Kushner in Berlin over the weekend. Witkoff said “a lot of progress was made” during the talks, which are set to continue on Monday.

Ukraine’s offer marks a major policy shift. It has long coveted membership of the Western military alliance, whose members are obliged to consider an attack on one as an attack on all under Article 5 of the NATO treaty.

Zelenskyy said on Sunday that the offer to drop NATO membership in return for security guarantees was a compromise, amid resistance among some of its Western allies to its NATO bid.

“From the very beginning, Ukraine’s conditions – or perhaps more accurately, our ambition – was NATO membership. And that would have provided real security guarantees. Some partners from the United States and Europe did not support this direction,” he said in answer to questions from reporters in a WhatsApp chat on Sunday.