Bahrain's king on Monday banned members of dissolved opposition parties from running for election, months ahead of parliamentary polls, the official BNA news agency said.

The kingdom has been hit by waves of unrest since 2011, when authorities crushed protests demanding a constitutional monarchy and an elected prime minister.

Opposition movements have been outlawed and hundreds of dissidents have been imprisoned, with many stripped of their nationality.

The amended law on the exercise of political rights ratified by King Hamad prohibits "leaders and members of political associations dissolved for violating the kingdom's constitution or its laws" from standing in parliamentary elections.

It also bans anyone "convicted of a felony, even if they have been granted amnesty".

Individuals who "intentionally harm or disrupt the constitutional and parliamentary process" are also prohibited from running for office, according to BNA.

The revision comes as Bahrain prepares to renew its 40-seat parliament this autumn.

Opposition parties boycotted the last elections in 2014.

Since then, authorities have outlawed the main Shia opposition group, Al-Wefaq, and the main secular opposition group, the National Democratic Action Society (Waad).

Bahrain, a key ally of the United States and home to the US Fifth Fleet, accuses Iran of provoking unrest in the kingdom, allegations that Tehran denies.

Earlier this month, a Bahraini appeals court upheld a five-year prison sentence against prominent human rights advocate Nabeel Rajab over tweets critical of the government and the Saudi-led coalition's war on Yemen.

Rights groups have accused the Bahraini government of repressing free speech in a crackdown on dissent.

"Courts convict and imprison peaceful dissenters, including prominent human rights defenders and opposition leaders, and file trumped-up charges against their relatives. Security forces use excessive force to disperse peaceful assemblies," Human Rights Watch said in a report this year.