An ultra-Orthodox Jewish member of Israel's parliament has submitted his resignation after prominent rabbis criticised him for attending his gay nephew's wedding.
Yigal Guetta revealed in a radio interview on Sunday that he had gone to the ceremony two years ago.
He said that although same-sex marriage was against his religious beliefs he had wanted to make his nephew happy.
But five rabbis accused Mr Guetta of desecrating God's name and demanded that the religious Shas party fire him.
Same-sex weddings held in Israel are not sanctioned by the state. However, couples who wed abroad can register officially as married couples.
In his interview with Army Radio, Mr Guetta explained why he had chosen to attend his nephew's wedding.
"I told my kids before we went: 'You should know that we're going in order to make him happy, because he's my sister's son, and she's my sister and I want to embrace her. But the Torah says this [relationship] is forbidden and an abomination," he was quoted as saying by the Times of Israel.
Then he added: "'What can you do? My own judgment is irrelevant here.'"
But a letter published on Monday by five rabbis said a same-sex marriage was "a terrible prohibition, among the most severe in the Torah".
They called on the leaders of Shas "to not endorse this terrible desecration of God's blessed name and to remove and fire [Mr Guetta] immediately".
Mr Guetta did not issue a statement after sending his resignation letter to party leader Aryeh Deri, who accepted his decision.
But the Haaretz newspaper cited a source close to him as saying he had refused to apologise and decided to leave before being asked to do so by Shas leaders.
The head of the secular Yesh Atid party, Yair Lapid, tweeted: "It's sad that in Israel in 2017 a [Member of the Knesset] is forced to resign because he participated in the wedding of two people who love each other."
Media reports say Mr Guetta has not submitted his resignation to the Speaker of the parliament, which is required for it to take effect.
Update 19 September 2017: This story has been amended to make it clear that while Yigal Guetta had informed his party of his decision to resign, he had not at that time sent a letter of resignation to the Speaker of the parliament.