Parliament approves controversial treaty to hand over the islands of Tiran and Sanafir to Saudi Arabia.

Egypt’s parliament has voted to ratify a 2016 agreement under which Cairo would transfer two Red Sea islands to Saudi Arabia.

Wednesday’s vote, during which those politicians in favour of the accord were asked to stand up in the house, came shortly after the 596-seat chamber opened a debate on the pact earlier in the day.

The debate followed clashes the previous night between police and opponents of the deal in downtown Cairo that saw policemen kick, punch and use sticks to beat several dozen protesters.

The outcome of the vote was a foregone conclusion since parliament is packed with supporters of the government of President Abdel Fattah el-Sisi.

The government insists the islands of Tiran and Sanafir at the mouth of the Gulf of Aqaba were always Saudi but were placed under Egypt’s protection amid Arab-Israeli tensions in the 1950s.

READ MORE: Egypt – Parliament committee approves Saudi islands deal

Critics have linked the islands’ transfer to the billions of dollars in Saudi aid given to Sisi’s government, saying it amounts to a sell-off of sovereign territory.

The island of Tiran, a popular destination for Red Sea divers, controls a narrow shipping lane that leads to and from the ports of Eilat and Aqaba, in Israel and Jordan respectively.

Egypt’s unilateral closure of that lane was among the main reasons behind the outbreak of the 1967 Arab-Israeli war, in which Egypt lost the entire Sinai Peninsula.

The agreement to hand over the islands was announced during the April 2016 visit to Cairo by the Saudi king, leading to the largest anti-government protests since Sisi took office in 2014. Hundreds of demonstrators and activists were arrested, with most later released.

A court ruled against the islands’ transfer in January, but politicians who support the deal say parliament has the right to ratify international agreements.

“There is nothing in the agreement that violates the constitution,” Kamal Amer, chairman of the defence committee, told the house on Wednesday.

“It is designed to realise and perpetuate the mutual interests of the two nations and it also came in response to Saudi requests [to take back the islands] made in 1984, 1989 and 1990.”

“The demarcation of the border between Saudi Arabia and Egypt confirmed that the islands are on the side of that brotherly nation, but we are confident that they [the islands] will always be used to serve national Egyptian and Arab security,” Amer added.

Earlier on Wednesday, members of the defence and national security committee said they approved the deal with a 35-2 vote in favour of the pact, paving the way for the document to be ratified by the full house.

The house’s legislative and constitutional committee approved the deal on Tuesday after a three-day, often raucous review during which politicians got into heated arguments, pushed and shoved each other and came close to blows.