CAIRO — President Abdel Fattah el-Sisi of Egypt ratified an agreement on Saturday that cedes sovereignty over two uninhabited Red Sea islands to Saudi Arabia, brushing off widespread public criticism of the deal in Egypt.

The Red Sea islands accord has become politically sensitive for Mr. Sisi. He counts on Saudi Arabia as a critical ally, but street protests erupted last year among Egyptians angered by the agreement.

This month, Egypt’s Parliament backed the deal, which gives Saudi Arabia control of the islands, Tiran and Sanafir.

“President Abdel Fattah el-Sisi has ratified the maritime demarcation agreement between the Arab Republic of Egypt and the Kingdom of Saudi Arabia,” the Egyptian cabinet said in a statement.