Burkina Faso's President Blaise Compaore is seen at the summit of West African regional bloc ECOWAS on the crisis in Mali and Guinea Bissau, at Fondation Felix Houphouet Boigny in Yamoussoukro February 27, 2013. REUTERS/Thierry Gouegnon (IVORY COAST - Tags: POLITICS)

Ouagadougou - Lawmakers in Burkina Faso modified the electoral code on Tuesday to prevent people from standing for office if they had supported a failed move last year to allow then-President Blaise Compaore to seek a new term.

The country is run by a transitional government ahead of elections in October, and current ministers are also not authorised to run for president.

Compaore was ousted from power last October in the face of mass protests against the bid by his supporters to revise article 37 of the constitution.

He seized power in a coup in 1987 in Burkina Faso, a country that produces gold and cotton.

Under the new law, “anybody is ineligible (to run) who supported the unconstitutional change that threatened the principle of democratic choice and especially the principle of presidential term limits.”

The law applies to all elections in 2015 and 2016 and effectively bars members of Compaore's government and the leaders of his Congress for Democracy and Progress (CDP) party as well as the former president's allies.

Deputies from the previous parliamentary majority who supported Compaore said the law could weaken social cohesion.

The CDP rejected the law and said it was an attempt by a small group of activists to confiscate power.

Security forces on Tuesday dispersed youth supporters of Compaore outside the headquarters of the transitional national council.

Separately, police said on Tuesday that they had arrested eight members of Compaore's regime including former minister for mines and energy Salif Lamoussa Kabore for offences including embezzlement, disturbing the peace and illegal political activity.