BAGHDAD — Iraq’s top court said it has rejected a law that would have prevented embattled Prime Minister Nouri al-Maliki from seeking a third term in office after national elections in 2014, as an ongoing spate of violence claimed another eight lives Tuesday.
The Supreme Federal Court said in a brief statement on its website that it had ruled unconstitutional a controversial law that limits the premier, president, and the parliament speaker to two terms of office.
Maliki first became prime minister in 2006. He secured a second term in office after nearly nine months of political wrangling following the 2010 national elections.
His political rivals accuse him of consolidating power, bringing the security forces and other state institutions under his control, and sidelining rivals. They say he has plunged the country into political infighting that has contributed to declining security and some of the worst violence in years.
His backers say that he is a unifier who has restored a shattered Iraqi state, and that the Iraqi electorate should decide whether to keep him as prime minister.
After the law was passed in January by 170 members of the 275-seat legislature, Maliki’s allies dubbed it illegal and vowed to appeal it.
Two lawmakers — Maliki’s ally Ali al-Shalah and one of his opponents, parliamentarian Mohammed al-Khalidi — said the court issued its decision Monday on the basis that draft laws should be proposed by either the Cabinet or the president, not parliament.
The court could not be reached for comment.
‘‘We believe that there were political pressures on the court to overturn the draft law,’’ said Khalidi, who voted for it. ‘‘Rejecting the law is a danger to democracy in Iraq.’’
He said Parliament is only obliged to send to the Cabinet draft laws that need financial allocations.
A spokesman for Maliki, Ali al-Moussawi, said the bill ‘‘contradicts the constitution and all constitutions in the parliamentary systems which do not limit the term for the Prime Minister.’’
Authorities, meanwhile, reported at least eight people were killed in violent attacks Tuesday.
The deadliest incident happened when a bomb exploded outside a tribal sheik’s house in Madain, about 15 miles southeast of Baghdad. A second blast followed as onlookers gathered. A total of six people were killed and 12 more were wounded, police said.
In the restive northern city of Mosul, drive-by shooters killed a tribal sheik and a police officer in two separate attacks, police said.
Medical officials confirmed the casualties. All officials spoke on condition of anonymity as they were not authorized to release the information to journalists.
Iraq for months has been weathering its worst spike in violence since 2008, when the country was pulling back from the brink of civil war. More than 440 people have been killed in August, according to an Associated Press count.