Ministers who voted to release long-term Palestinian security prisoners on Sunday were forced to choose between “a bad decision and a worse decision,” Defense Minister Moshe Ya’alon said Monday, as peace talks between Israel and the Palestinians kicked off.

The controversial move, approved after a stormy and lengthy cabinet session, will be carried out in stages, will need to be formally cleared by the president, and could face legal challenges — which have failed to stop previous such releases.

Ya’alon said “the considerations that were taken into account” would one day be revealed, and added that security would be increased following the release of the 104 prisoners, many of whom were convicted for murders or terror attacks and have been in jail since before the Oslo Peace Accords of 1993. Ya’alon said security forces would respond with an increase in alertness.

Releasing the prisoners was a Palestinian precondition for peace talks, and while the decision was widely pilloried by politicians on the right and the Israeli public, Prime Minister Benjamin Netanyahu said it was for the “good of the country.”

The release will be in stages linked to continued progress in the talks, which are planned to last 6-9 months.

Justice Minister Tzipi Livni flew to Washington Monday to initiate the first round of renewed peace talks with chief Palestinian negotiator Saeb Erekat, under the auspices of US Secretary of State John Kerry. In conjunction with this, the first round of prisoners is expected to be released later this week.

For each phase, a list of prisoners to be released is to be prepared by the Justice Ministry and approved by Livni. As part of this process, the exact locations where each prisoner will be released will also be determined, which could be in the West Bank, Gaza or potentially abroad.

After this, the list will be transferred to President Shimon Peres, who will officially sign off on their early release. Then the list will be made public, allowing citizens to petition the High Court against the release of specific prisoners.

In 2011, the court struck down a petition by families of terror victims seeking to stop the release of some 1,000 Palestinian prisoners in exchange for kidnapped soldier Gilad Shalit. Israel has carried out prisoner swaps several times in the past, usually amid public opposition.

The Prison Service will be tasked with preparing the prisoners, which involves in each case positive identification, medical tests and debriefing with prison officials. Each prisoner will reportedly be asked to sign an agreement that he will not return to terror activity once granted his freedom.

Once all the pre-release steps have been accomplished, each group of prisoners will be driven, under heavy security, to predetermined locations for their release, where they are likely to be greeted by enthusiastic crowds of Palestinians.