Egypt’s parliament voted overwhelmingly Wednesday to revoke the membership of MP Tawfik Okasha for hosting the Israeli ambassador for dinner at his home last week.

Okasha, a popular TV talk show host, has been engulfed in controversy since Thursday, when Israeli ambassador Haim Koren posted a picture on the embassy’s Facebook page of the two of them meeting the evening before at the MP’s home.

Okasha also talked about the meeting in an interview in the Al-Masry Al-Youm daily, saying the two agreed Israel “has a key role in the issue of the dam” being built by Ethiopia on the Blue Nile.

The parliament’s official website said 465 deputies — or more than two-thirds of its members — voted to deprive Tewfiq of his seat on Wednesday.

“The penalty is not over his meeting with the ambassador of a foreign country, but because of the issues discussed during this meeting, in relation to Egypt’s national security,” it said.

The issue of the Ethiopian dam is seen in Cairo as a matter of national security.

“He has failed in his duties by inviting a foreign state to interfere to solve the issue of the dam,” deputy Khaled Youssef told AFP.

Egyptian TV showed footage of Okasha being barred from the parliamentary chamber, with security staffers closing the door in his face.

The vote came three days after a heavily publicized incident in which a lawmaker hit Okasha with his shoe to protest the meeting.

Though Egypt has full diplomatic relations with Israel, directly dealing with the Jewish state remains deeply taboo in Egyptian society.

In this Jan. 12, 2016 file photo, MP Tawfiq Okasha sits in an anteroom after he taped his mouth shut in protest at not being given the floor during a parliamentary session, in Cairo, Egypt. Arabic writing reads, "Banned from speaking inside and outside the house by government orders." (AP Photo/Said Shahat, File)

In this Jan. 12, 2016 file photo, MP Tawfiq Okasha sits in an anteroom after he taped his mouth shut in protest at not being given the floor during a parliamentary session, in Cairo, Egypt. Arabic writing reads, “Banned from speaking inside and outside the house by government orders.” (AP Photo/Said Shahat, File)

In an Arabic-language video posted Wednesday morning to Israel’s official diplomatic page to Egypt, “Israel in Egypt,” Koren acknowledged that his meeting with Okasha had “sparked debate and controversy within Egypt.”

Nevertheless, Koren said he would meet with any Egyptian citizen who wanted to set up a meeting with the Israeli embassy.

The ambassador added that he’d had a number of successful meetings with Egyptian journalists.

During the parliamentary vote, Okasha was criticized not only for meeting with the Israeli representative in his home in Cairo, but also for allegedly sharing sensitive information during their talk, the Egyptian news site Youm Sabah reported.

The Speaker of the House Ali Abdel-Al said before the vote: “We are not going to talk about a meeting of MP Tawfiq Okasha with an ambassador of a foreign country, but rather on the discussion of issues related to Egyptian national security during a meeting.”

Abdel-Al added that the Egyptian Parliament would continue to respect all its international treaties and agreements, including the peace treaty with Israel.

Before leaving the building under armed guard, Okasha told the Egyptian news site al Masry al Youm: “I was slaughtered, and there’s a determination to strip me of my membership.”

Okasha later wrote on twitter that he would seek the Egyptian presidency and “explode a revolution.”

Egypt's new ambassador to Israel, Hazem Khairat, with President Reuven Rivlin in Jerusalem, February 25, 2016 (Mark Neiman/GPO)

Egypt’s new ambassador to Israel, Hazem Khairat, with President Reuven Rivlin in Jerusalem, February 25, 2016 (Mark Neiman/GPO)

Last Thursday in Jerusalem, Egypt’s new ambassador to Israel hailed bilateral relations, expressing hope that the two countries’ “constructive” relationship would bring peace to the region. Hazem Khairat handed his diplomatic credentials to President Reuven Rivlin in Jerusalem, officially becoming Cairo’s first senior emissary to Israel since 2012.

AFP and AP contributed to this report.