The crown prince of Saudi Arabia, Russian oligarch Roman Abramovich, and a jet-set Ukrainian negotiator played key roles in months of talks that led to the release of more than 250 prisoners by Russia and Ukraine this week in a broader deal involving Turkey, according to U.S. and Saudi officials and others familiar with the negotiations.

Mr. Abramovich personally accompanied 10 prisoners, including British and American detainees captured by Russia in Ukraine, on a private jet that took them to Riyadh, Saudi Arabia, from Russia earlier this week, Saudi officials said. Other people familiar with the situation confirmed Mr. Abramovich’s involvement.

The flight was one aspect of a sprawling diplomatic agreement that led to the release of more than 200 Ukrainians, including some that were flown to Turkey, along with 55 Russians and a pro-Kremlin Ukrainian politician, who were returned to Russia. The release included soldiers involved in a monthslong siege in the city of Mariupol that became a symbol of Ukrainian resistance.

The unusual cast of characters involved in the agreement shows how Ukraine is reaching beyond its traditional partners to secure diplomatic breakthroughs at a time when Ukrainian forces are making gains against Russia on the battlefield.

Saudi Arabia’s involvement was perhaps the most surprising aspect of the exchange, which was also brokered by Turkey’s President Recep Tayyip Erdogan. Until the prisoner negotiations, the Saudi kingdom played little role in any diplomacy surrounding the Russia-Ukraine war as Crown Prince Mohammed bin Salman has drawn closer to Russia in recent years.