Six prominent opposition lawmakers in Turkey have resigned in connection with a sex scandal, just ahead of national elections next month.

According to Turkish media, the six men were members of the Milliyetçi Hareket Partisi (MHP) – or Nationalist Action Party --including four vice-presidents, after a website broadcast compromising extra-marital sex videos of the men.

Earlier this month, four other senior MHP politicians also quit, following the online release of sex videos involving them.

Moreover, last year the head of the main opposition party, the secular Republican People's Party, Deniz Baykal, resigned after images of him in a bedroom with a female MP were put on the internet.

The current resignations would appear to help the chances of the ruling Adalet ve Kalk?nma Partisi (AKP) – the Justice and Development Party – gaining a third consecutive term in office.

MHP is Turkey’s second largest opposition party. However, according to BBC, if the party receives less than 10 percent of the popular vote, it will not be able to hold any seats in parliament.

One of the MHP officials who quit, deputy chairman Deniz Bolukbasi, said he was entrapped in a scheme engineered by Prime Minister Recep Tayyip Erdogan of AKP.

I am resigning to spare my party the damage such allegations might cause, he said, according to Associated Press.

The dark forces behind this ugly political plot, both at home and abroad, will come to light as part of the ongoing investigation, Bolukbasi told Agence France Presse.

The state-run Anatolian news agency said the other five who resigned comprised deputy chairmen Osman Cakir, Umit Safak and Mehmet Ekici, general secretary Cihan Pacaci and his deputy Mehmet Taytak.

The AKP has denied that it had anything to do with the videos. In fact, Turkish authorities have taken measures to prohibit access to the videos.

It is up to the party to deal with its internal affairs, Ahmet Davutoglu, the foreign minister, told NTV television.

As unethical as they may be, I do not believe releasing those videos is correct behavior, judging from a humanitarian perspective.

The boss of MHP, Devlet Bahceli, is himself under enormous pressure to resign, which he has refused to do.

A Turkish analyst told Al Jazeera: The [MHP] party is extremely demoralized and has lost its focus on the real issues that the voters want to hear about.”