Spoiling relations between Egypt and its principal financial backer in the region, Saudi Arabia, were delivered a hammer-blow on 16 January as Cairo's high court scuppered the government's last gasp efforts to handover two Red Sea Islands to the gulf kingdom.

The final verdict from the court, which previously ruled on the legality of handing over the islands of Tiran and Sanafir, prompted celebrations outside the building in the Egyptian capital. The issue of the islands has become a touchstone problem in the country with the opposition viewing their handing over as a violation of sovereignty.

"Saudi Arabia, take your money back, for tomorrow, the Egyptian people will trample on you," a small number of activists chanted according to the Associated Press.

Egyptian state news reported intensive security measures were in place outside the court with a number of protestors arrested. In Egypt, where public dissent has all but vanished in the face of a heavy-handed government to protests, the issue of the Red Sea islands still has the power to bring demonstrators on to the streets.

The court ruled Sanafir and Tiran were Egyptian, contradicting the government's claim the islands were Saudi and only given to Egypt in the 1950s to protect them from a possible attack by Israel.

"It's enshrined in the court's conscience that Egypt's sovereignty over Tiran and Sanafir is beyond doubt," the court's presiding judge, Ahmed al-Shazli, said as he announced the verdict to a packed courtroom.

Sisi's deeply nationalistic government has been accused of hypocrisy over the seceding of national territory but the regime in Cairo has been desperate for a deal with Riyadh.

Ignoring process in the court, Sisi's government approved the agreement last month on the islands and sent it to parliament for ratification – a congress which is packed with the president's supporters.

The islands have become a sticking point between the two nations and have hindered virtually every regional issue Saudi Arabia and Egypt have addressed – from the conflicts in Syria, Yemen and South Sudan to the Renaissance Dam Project in Ethiopia.

In September Saudi Arabia cancelled fuel shipments to Egypt, crippling the country's economy which has been left devastated by years of instability following the country's 2011 uprising.