The lawmakers approved the agreement on Wednesday, following a heated debate in the chamber dominated by deputies loyal to former general Abdel-Fattah el-Sissi.
Previously, the unpopular deal was unanimously endorsed by Egypt's Defense and National Security Committee. The committee was "certain" that the uninhabited Red Sea islands rightly belong to Saudi Arabia, according to chairman Kamal Amer.
"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 told lawmakers.
In turn, opposition representatives chanted "Egyptian, Egyptian" and tried to disrupt the vote.
The legal effects of the decision were not immediately clear, as one of the nation's top courts previously ruled that parliament had no authority to hand away Egyptian territory. The jurisdiction dispute is to be solved before the Supreme Constitutional Court, but the body has yet to set a date to start the proceedings.
The news of the upcoming deal had also sparked violent protests in Cairo late on Tuesday.
The islands of Tiran and Sanafir were administrated by Saudi Arabia until 1950, when Riyadh asked Cairo to protect them from a possible Israeli attack. Israel indeed attacked and conquered the islands in 1967, but later returned them to Egypt as part of the Camp David accords in 1979.
Saudi Arabia repeatedly requested the islands back. Egyptian authorities, however, were reluctant to grant those demands, with many politicians citing a 1906 agreement between Egypt and the Ottoman Empire as evidence of Cairo's right to the islands. The older demarcation accord was approved well before Saudi Arabia's founding in 1932.
Backing for regime from Riyadh
Cairo announced its intent to return the islands in April last year, during a visit by Saudi King Salman. The news triggered rare protests against the el-Sissi regime across the country. Government opponents publicly linked the deal with billions in loans and infrastructure projects promised by the Saudi monarch, and accused the president of selling Tiran and Sanafir to the oil-rich neighbors.
Saudi Arabia also backed el-Sissi in the coup he led to replace Mohammed Morsi in 2013. In another testament to close ties, el-Sissi backed Riyadh in the current dispute with Qatar.
Wednesday's vote also requires confirmation from the Egyptian president.
dj/msh (AFP, dpa, AP, Reuters)