Egypt's parliament on Wednesday approved a controversial maritime accord with Saudi Arabia that transfers two strategic Red Sea islands to the kingdom, state television and a lawmaker said.
The deal, which is still being challenged in an Egyptian court, sparked rare protests last year, with the opposition accusing the government of selling Egyptian territory to its Saudi benefactors.
The vote came after days of heated debate in parliament with opponents even interrupting one committee session with chanting.
Courts had struck down the agreement, signed in April 2016, but a year later another court upheld it.
Lawyers are now challenging the deal before the constitutional court, and President Abdel Fattah al-Sisi will have to ratify it.
The accord had sparked rare protests in Egypt, with Sisi accused of having traded the islands of Tiran and Sanafir for Saudi largesse.
The government has said the islands were Saudi to begin with, but were leased to Egypt in the 1950s.
Opponents of the agreement insist that Tiran and Sanafir are Egyptian.
On Tuesday evening, dozens of journalists protested against the agreement in central Cairo, before being dispersed by police, journalists' union official Gamal Abdel Rehim told AFP.
Several were briefly arrested before being released but "three reporters are still detained, and contacts are being made with the interior ministry to get them released".
The government first announced the deal during a visit by Saudi King Salman in April 2016 during which Riyadh showered Egypt with aid.
Opponents of the government, and even some of its supporters, were enraged by the secrecy that surrounded the agreement until it was announced.
Generations of Egyptians had grown up learning in school that the two islands belonged to their country, and that soldiers had died defending them during wars with Israel.
Lying at the mouth of the Gulf of Aqaba, the islands can be used to control access to the Israeli port of Eilat. They were captured by Israel in the 1967 Middle East war before being returned to Egypt under the 1979 Camp David Accords.
Sisi went ahead with the deal even though it threatened to dent his popularity, and at a time the government, which is grappling with austerity reforms that have fuelled inflation, is wary of protests.
Over the past weeks, Egypt has blocked dozens of news websites.
While many of the sites are based in regional rival Qatar, others are Egyptian and have expressed criticism of the islands' transfer.