A Cairo court has approved the redrawing of the maritime boundary between Egypt and Saudi Arabia on Thursday, according to a report in Egypt’s state TV news portal Egynews.

The decision, which overturned a previous ruling, means the two Red Sea islands of Tiran and Sanafir will be transferred to Saudi Arabia.

The decision is not final, however, and it can still be appealed.

The new maritime border agreement was reached between Egypt and Saudi Arabia in April.

At the centre of the dispute are the unpopulated islands of Tiran and Sanafir located in the Gulf of Aqaba, a strategic part of the Red Sea bordered by Israel, Jordan, Egypt and Saudi Arabia.

The Egyptian government defended itself by controversially saying the Tiran and Sanafir islands had always belonged to Saudi Arabia and that Egypt had merely administered them while on lease since the 1950s.

It has also argued that determining the borders of the nation is a matter of state sovereignty and should not be reviewed by the courts.

Many Egyptians, however, accuse President Abdel Fattah el-Sisi of "selling" the islands in return for generous aid packages from Saudi, stressing that the deal is unconstitutional as state land cannot be given away under the Egyptian constitution.

The original transfer back in April was also condemned by the country's largest - but banned - opposition movement, the Muslim Brotherhood.

"The Muslim Brotherhood hereby declares unequivocally that no one has the right to abandon the property and resources of the Egyptian people in exchange for a fistful of dollars, or in exchange for support for government policies sanctioning murder, detentions, violations, forced disappearances and extrajudicial killings," the movement said in a statement at the time of the original transfer.

The agreement was also rejected by exiled opposition politician Ayman Nour, along with nine other dissidents, who warned that "once the peoples become free, they will not approve agreements that were signed during the reign of governments that are used to giving away the rights of their citizens".

In an interview with Middle East Eye in April, Nour said that Sisi had lost international credibility and even King Salman's visit did not mean he had the full backing of Saudi Arabia.

“Even the Saudis no longer support Sisi directly. Any support is for the Egyptian nation. If Turkey and Qatar are not so vociferous in their opposition to Sisi any more, it is not because they have given up, but because they know the international tide against him is turning,” he said.

The agreement harmed national sentiment and outraged people, pushing them to protest against the decision. More than 150 people were arrested in connection with the demonstration.

“Our right to this land is won by blood, not by documents and maps,” protest organisers wrote on their Facebook page at the time, while showing images of Egyptian soldiers on the island of Tiran in 1967.

“We gave more than 100,000 martyrs in our wars with Israel to restore this land. Tiran and Sanafir are our right, Egypt’s right, the right of our children and of our ancestors who were killed there.”