Russia and Ukraine have agreed to the largest prisoner exchange of the war after two days of U.S.-mediated talks in Abu Dhabi, and the American envoys who brokered the deal will travel to Moscow on Thursday to put the agreement to President Vladimir Putin.

U.S. envoy Jared Kushner told reporters after the talks ended on Wednesday that the two sides had agreed to "the biggest humanitarian release of prisoners" since the war began, with the final numbers to be settled on Thursday. The second day of negotiations lasted less than two hours, according to Russian state news agency TASS and Ukraine's Interfax news agency, bringing to a close the first direct meeting between the two sides in nine months.

Ukrainian President Volodymyr Zelenskyy had said the formula under discussion was an exchange of either 1,000 prisoners from each side or 1,500 from each side. The Russian General Staff said more than 1,000 captives would be handed over by each side over the next two to three weeks, TASS reported. The deal was confirmed by Vladimir Medinsky, who led the Russian delegation, and Rustem Umerov, who led Ukraine's delegation.

Davyd Arakhamia, a member of Ukraine's negotiating team, said the exchange would be "one of the largest, if not the largest" of the war, calling it "already a major achievement." For the swap to be the largest of the war it would have to top the 1,000-for-1,000 exchange carried out in May last year. The two sides last freed 200 prisoners each in March, after talks in Geneva in February.

Kushner said he and fellow U.S. envoy Steve Witkoff would fly to Moscow on Thursday to meet Putin and "go over what was discussed today," adding that the American side saw "some openings and some opportunities there." The envoys are then scheduled to travel to Dublin to meet Zelenskyy and explore ideas raised in Abu Dhabi. Kushner described the sessions as "some pretty tough discussions after almost eight months of not being together."

There was no breakthrough on ending the war itself, which is approaching its fifth year. Moscow wants Ukraine to give up the parts of the Donetsk region it still controls, drop its bid to join NATO and accept limits on its armed forces — demands Kyiv has rejected. Representatives of European governments, the European Union and NATO were in Abu Dhabi consulting with the Ukrainian side, but Moscow has objected to direct European involvement in the negotiations.

The talks, which began on Tuesday, were the first three-way round since negotiations in Geneva in February ended without progress. The first day lasted about four hours and dealt largely with humanitarian issues, including the return of prisoners of war, captive civilians and children taken from Ukraine. Wednesday's agenda covered a possible ceasefire, energy and security in the Black Sea, according to Ukrainian media reports.