Iraqi Prime Minister Nuri al-Maliki refused to step down as prime minister Wednesday, even as many Iraqis threw support behind his U.S.-backed replacement. 

Maliki's hold on Iraq's government is tenuous at best, as Haider al-Abadi, his Shiite Islamist party colleague, gains support from both Western and Middle Eastern powers. 

Iran's supreme leader supports Abadi, agreeing with the U.S. and many Iraqis that a new government is crucial to stop the advance of The Islamic State of Iraq and Syria (ISIS), Sunni militants who have been violently seizing northern Iraqi towns. 

Maliki said the supreme court must rule on the recent move to oust him from the presidency, according to Reuters. While he claims the supreme court must make the final decision, he is losing loyalty from many in the Shiite militia and government forces, as he is blamed for alienating the Sunni minority during his eight years as president. 

The Unites States and its European allies backed Abadi as president, while also arming Kurdish forces Wednesday to continue fighting ISIS. 

Iranian Supreme Leader Ayatollah Ali Khamenei, who is against the rise of Sunni jihadists, personally endorsed Abadi. He publicly distanced himself from Maliki, who has looked to Iran for support. 

"I hope the designation of the new prime minister in Iraq will untie the knot and lead to the establishment of a new government and teach a good lesson to those who aim for sedition in Iraq," Khamenei said in a statement. 

Khamenei sent an envoy in July to take part in negotiations with Iraqi Shiite political and religious leaders to find an alternative to Maliki. The envoy, which included Iraqi cleric Grand Ayatollah Ali al-Sistani, all supported Abadi, the former head of a British engineering company. They believe Abadi could unite moderate Sunnis and persuade them to hold off ISIS in the north. 

Maliki said that he must, by right, be given the chance to form a new government. He therefore said that the appointment of Abadi as prime minister-designate by President Fouad Masoum violates the constitution. 

"The violation that occurred has no value, and its consequences have no effect," Maliki said on television. "This government is continuing, and will not be changed except after the Federal Court issues its decision."

According to the constitution, Maliki should continue as acting premier with limited powers until a new government is formed and sworn in. 

Maliki still has the loyalty of senior commanders of the police, as well as some Shiite militias. It is possible that he could try to resist his ouster by force. Yet, on Tuesday, he said that he will not involve military commanders in the dispute. 

While many Iraqis have turned against Maliki, many still support him, and showed their loyalty through protests this week. 

Meanwhile, France announced that it would join the U.S. in supplying arms to the regional Kurdish peshmerga forces who are trying to stave off ISIS. European Union officials will meet Friday to discuss possible solutions to the crisis. 

Western powers have been arming the Kurdish forces, and have also been helping aid agencies drop supplies and provide shelter for thousands of ethnic minorities who have fled attacks by the militants. 

ISIS has already taken control of large areas in Syria, and announced a religious caliphate in the region. They took advantage of the political deadlock in Baghdad following the election in April by capturing large parts of the region. 

Sectarian violence has increased in other areas, such as in Baquba, northeast of Baghdad, where five Sunnis were killed Wednesday when they were shot by Shiite gunmen while praying in a mosque.