Israel and the militant Islamist group Hamas announced Tuesday that they had agreed on an exchange that would free about 1,000 Palestinian prisoners in return for Staff Sgt. Gilad Shalit, an Israeli soldier held captive in the Gaza Strip for more than five years.

The Israeli Justice Ministry said Wednesday that a list of 477 prisoners to be released in the first stage of the swap will be published on the Israel Prison Service’s Web site Sunday.

“As we have done in the past, we intend to give the public a period of at least 48 hours from the moment of the publication of the list of prisoners to submit reservations or opposition to this or that release,” the ministry said in a statement.

A ministry official who spoke on the condition of anonymity because he was not authorized to comment on the matter said the list was not finalized and added, “The earliest the swap will take place is Tuesday or Wednesday next week.”

The newly elected head of the Labor Party, Shelly Yachimovich, said in a radio interview Wednesday that the opposition fully supports the swap, which public opinion polls have shown is also backed by the vast majority of Israelis.

Others, however, voiced concern about the deal. Meir Indor, head of the terrorist victims’ association Almagor, said after the announcement that “those who will pay the price of the swap are the scores and hundreds of wounded and dead from future terror attacks.”

“I recommend that the public wear flak jackets,” he said.

National Infrastructure Minister Uzi Landau, a member of the far-right Yisrael Beiteinu (Israel Is Our Home) party and one of three ministers to vote against the deal, said the move represented a victory for terrorism. “It will be a blow to Israel’s deterrence and the security of Israel,” he said.

The consummation of a deal between the sworn adversaries after years of fruitless negotiations reflected the pressures facing both Israel and Hamas at a time of region-wide uprisings and a rapidly shifting Middle Eastern landscape.

Israeli Prime Minister Benjamin Netanyahu had previously warned that a swap for Shalit would free dangerous militants and put Israel’s security at risk. But amid a relentless campaign by Shalit’s family that won the hearts of the Israeli public, Netanyahu ultimately bowed. In remarks Tuesday night, he acknowledged that Israel, which has become increasingly isolated amid the regional tumult, was faced with the stark choice of winning Shalit’s freedom now or seeing the chance disappear forever.

Hamas, meanwhile, receives a much-needed boost from the deal at a time when it has been overshadowed by Fatah, its chief rival, which has led a popular bid at the United Nations for Palestinian statehood. By winning the release of hundreds of Palestinian prisoners, Hamas can claim an achievement that had long eluded the Fatah-led Palestinian Authority.

Still, the move eliminates one of Hamas’s chief bargaining chips in its dealings with Israel. And despite the successful outcome of the Egyptian-brokered negotiations, there was little indication that Tuesday’s deal would lead to a broader breakthrough in Middle Eastern peace talks, which remain dormant.

Both Israel and Hamas were quick on Tuesday to trumpet news of the swap.

“If all goes well, Gilad will return to Israel in the coming days, to his family and people,” Netanyahu said in public remarks before his cabinet overwhelmingly approved the deal, which had been signed in Cairo by both sides.

In a televised speech from Damascus, Syria, Hamas leader Khaled Meshal said 1,000 Palestinian prisoners will be released: 450 within a week, followed by 550 two months later. He said those freed will include 315 serving life sentences and 34 of the longest-serving prisoners. In addition, all 27 Palestinian women held in Israeli jails will be freed, he said.

Yoram Cohen, chief of the Shin Bet, Israel’s domestic security service, told reporters that the freed prisoners will not include top Hamas commanders and prominent figures whose release had long been sought by the Islamist group. Those include Marwan Barghouti, a popular leader of the Fatah movement in the West Bank who played a leading role in the second Palestinian uprising and who is serving five life sentences for directing deadly attacks on Israelis.

Cohen said more than 200 of the freed prisoners would either be deported abroad or moved from the West Bank to the Gaza Strip. Of the 450 prisoners to be released in the first stage, Cohen said, 280 had life sentences. The exact timing of the releases was unclear as of late Tuesday.

Shalit, 25, a member of a tank crew, was seized in June 2006 in a cross-border attack by Hamas militants who tunneled into Israel from the Gaza Strip and attacked an Israeli army post near the frontier. He has not been visited by the Red Cross or seen since, except in a video released by Hamas in 2009 in which he appeared alive and well.

The deal provides Netanyahu with a lift at home at a time when he has been accused of diplomatic inaction and leaving Israel isolated amid sweeping change in the region.

“I believe that we reached the best agreement that could be achieved at this time, when storms are buffeting the Middle East,” Netanyahu said. “I don’t know whether the near future would have enabled us to achieve a better agreement, or an agreement at all, and it is very likely that this window of opportunity created by current circumstances would have closed for good, and we would not have brought Gilad back at all.”

Seated before a Palestinian flag and the banner of Hamas, Meshal on Tuesday assumed the mantle of a national leader in his televised speech, declaring the prisoner swap a “great national achievement” for the Palestinian people. He said that the prisoners to be freed were from the West Bank, the Gaza Strip, Israel and abroad, showing “the unity of the people, inside and outside.”

The prisoner release, he said, was a prelude to the achievement of other national goals: “liberating the land, liberating Jerusalem and the return” of the Palestinian refugees to their former homes in Israel.

Hamas had watched from the sidelines as its rival, Palestinian Authority President Mahmoud Abbas, led the Palestinian statehood bid in New York last month and rode a wave of popularity for standing up to U.S. pressure against the move.

“Hamas is watching Abbas’s popularity go up after his speech at the U.N., and they are trying to regain their popularity lost in the few years since they have taken over the Gaza Strip,” said Mkhaimar Abusada, a professor of political science at Al-Azhar University in Gaza.

Hamas routed Abbas’s Fatah faction in a brief civil war in the Gaza Strip in 2007, seizing control of the territory. A deal reached this year between the two factions has yielded little actual reconciliation.

Egypt has long served as the mediator between Israel and Hamas in the Shalit negotiations, and that has not changed since Egyptians overthrew President Hosni Mubarak in February.

The post-revolutionary Egyptian leadership — an interim military council — has maintained channels of communication with the Israelis while improving ties with Hamas, which Mubarak viewed with hostility.

“The Egyptians, with all their problems, were engaged full steam,” said David Meidan, Israel’s special envoy.

The deal produced expressions of joy among both Israelis and Palestinians.

Gazans celebrated in the streets Tuesday night, with Hamas supporters touting the deal as a resounding victory. In Jerusalem, near the tent where Shalit’s parents and supporters have held a months-long vigil outside Netanyahu’s official residence, a crowd gathered to dance and wave flags.

Capitalizing on the emotions of the moment, Netanyahu said he had called in the captive soldier’s parents and told them that he was keeping his promise to bring their son home.

“I told them, ‘I’m bringing your boy back,’ ” he said.

Special correspondents Samuel Sockol and Sufian Taha in Jerusalem and Islam Abdel Kareem in Gaza City contributed to this report.