May 8 (UPI) -- Russia and Ukraine on Friday confirmed a three-day cease-fire and prisoner swap, which they said was agreed to after their leaders spoke with U.S. President Donald Trump.

Trump announced in a post on Truth Social that the countries agreed to pause the conflict Saturday through Monday, and for both country to swap 1,000 prisoners each that have been captured during the four-year war.

Ukrainian President Volodymyr Zelensky confirmed the agreement in a post on X, and said that he has instructed his team to "promptly prepare everything necessary for the exchange."

Russian presidential aide Yuri Ushakov also confirmed the deal, saying that Russian President Vladimir Putin found it acceptable and that Russia "welcomes" it, Turkey's state-run Anadolu Agency reported.

Related