Six senior politicians in a Turkish opposition party resigned on Saturday amid a sex video scandal that could have far-reaching consequences in elections on June 12.

Turkish media said the Nationalist Action Party lawmakers were shown on compromising videos released on the Internet. Four top members of the hardline nationalist group resigned earlier this month because of similar videos, some showing them having sex, reportedly in a house that party members used for extramarital affairs.

"I am resigning to spare my party the damage such allegations might cause," said lawmaker Deniz Bolukbasi, who was among the new group that resigned. He alleged he was the victim of a politically motivated trap.

A shadowy group calling itself "Different Nationalists" released the videos, triggering accusations from the Nationalist Action Party that supporters of Prime Minister Recep Tayyip Erdogan were trying to undermine the party. Erdogan's party has denied the allegation.

Surveys show the party is hovering around a 10 percent support threshold designed to exclude smaller parties from parliament. If it fails to pass the 10 percent barrier, its votes would be redistributed among parties represented in parliament, handing even more power to Erdogan's ruling party.

The ruling party appears to be easily heading toward a third term in office, but it is aiming for an overwhelming majority that would allow it to rewrite Turkey's constitution.

Turkish authorities have moved to block access to the videos.

"It is up to the party to deal with its internal affairs," Foreign Minister Ahmet Davutoglu said on NTV television. "As unethical as they may be, I do not believe releasing those videos is correct behavior, judging from a humanitarian perspective."

One video that shows a Nationalist Action Party lawmaker having sex is followed by an on-screen message for his party that urges "everybody from head to toe in the management" to resign.

Last year, Deniz Baykal, the longtime leader of Turkey's secular main opposition party, stepped down as chairman after a secretly taped video allegedly showed he was having an affair. Baykal claimed he was a victim of a political plot by the government. Prosecutors launched an investigation but have not found the perpetrator.