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.
Al-Maliki first became prime minister in 2006. He secured second term in office after nearly nine months of political wrangling after 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 declining security and some of the worst violence in years.
His backers say 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, al-Maliki's allies dubbed it illegal and vowed to appeal it.
Two lawmakers -- al-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 couldn't be reached for comment.
"We believe that there were political pressures on the court to overturn the draft law," said al-Khalidi, who voted for it. "Rejecting the law is a danger to democracy in Iraq." He said parliament is only obliged to send to Cabinet those draft laws that need financial allocations.
A spokesman for al-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."