CAIRO — The social media hashtag #Egyptissold says it all.

The virtual world of Egyptians erupted on Sunday with the news that Egypt had handed over two Red Sea islands, Sanafir and Tiran, to Saudi Arabia as a show of gratitude for the kingdom’s immense economic aid. Thousands took to Twitter and Facebook to condemn the decision by Egypt’s cabinet.

The uninhabited islands, which have been in dispute for decades, are located in the Red Sea at the entrance to the Gulf of Aqaba. They once formed the border between the Ottoman Empire and British-occupied Egypt. They were under Israeli rule briefly in 1967 and then returned to Egypt after the Camp David agreement was signed in 1982.

The Egyptian cabinet said in a statement that Sunday’s decision was the conclusion of six years of studies and 11 rounds of negotiations before it was decided the islands lie in Saudi regional waters.

Egyptians didn’t buy the reasoning.

Some used a well-known scene in the 2002 Egyptian film “I want my rights,” in which an old man admonishes the protagonist for trying to sell Egypt to the highest bidder -- “So you sold your land, Awad,” the man says.

On Sunday, along with #Egyptissold, the hashtag #Awadsoldhisland went viral.

Egyptian political satirist Bassem Youssef, who started the #Awadsoldhisland hashtag, sent a tweet filled, of course, with satire: “Come on Pasha, an island will cost you a billion, a pyramid will cost two billion and you’ll get two statues thrown in as a gift.”

Saudi Arabia, along with other Arab nations of the Persian Gulf, has pumped billions of dollars into Egypt’s flailing economy ever since the army deposed Islamist president Mohamed Morsi in 2013. But analysts say the Saudi kingdom has been disappointed with the lack of economic progress. Hence, it seeks from Egypt economic agreements that could bring about a return on its investment.

The deal came as a part of a spate of economic agreements signed during Saudi King Salman’s first visit to Egypt. The accords also include the creation of a $16 billion Saudi Egyptian investment fund and the building of a bridge between Egypt and Saudi Arabia to be named after the king.

Some Egyptians tweeted images of school geography textbooks describing the islands as proof that the islands belonged to Egypt. Others noted an advertisement on public television promoting Tiran as a tourist attraction of the popular Red Sea resort of Sharm el-Sheikh. Some even tweeted that a speech given in 1954 by former president Gamal Abdel Nasser stressed the need to keep the islands under Egyptian sovereignty.

The outrage is not limited to social media. Eleven people were arrested in downtown Cairo on Sunday for protesting the decision to declare the islands part of Saudi territory, according to local media.

Prominent opposition figures are also taking a stand. Khaled Ali, a former presidential candidate and a prominent human rights lawyer, announced he had filed a legal complaint to stop the handover. Another former presidential candidate, exiled politician Ayman Noor, and nine other prominent dissidents issued a statement condemning the deal.

Even supporters of the government are displeased. Ahmed el-Naggar, the head of the main governmental newspaper al-Ahram, wrote in a Facebook post that “elements of our national borders are untouchable” and that “Egyptians have a long history of protecting Tiran from occupation.”

Read more: