BAGHDAD -- Troops and patrols deployed throughout Baghdad on Sunday following the failed assassination attempt with armed drones that targeted the residence of Iraq's prime minister.

The attack significantly raised tensions, sparked by the refusal of Iran-backed militias to accept last month's parliamentary election results.

Seven of Prime Minister Mustafa al-Kadhimi's security guards were wounded in the attack by at least two armed drones in Baghdad's heavily fortified Green Zone area, according to two Iraqi officials.

They spoke on condition of anonymity because they were not authorized to give official statements.

Al-Kadhimi suffered a light cut, an aide said. He later appeared on Iraqi television, seated behind a desk in a white shirt, looking calm and composed, with what appeared to be a bandage on his left hand.

"Cowardly rocket and drone attacks don't build homelands and don't build a future," al-Kadhimi said during the television appearance. Later on Sunday, he met with Iraqi President Barham Salih and headed a government security meeting.

The sound of an explosion and heavy gunfire echoed across Baghdad from the direction of the Green Zone, which houses foreign embassies and government offices.

Handout photos showed the damage to al-Kadhimi's residence, including smashed windows and doors blown off their hinges.

There was no claim of responsibility for the attack, but suspicion immediately fell on Iran-backed militias who had been publicly attacking al-Kadhimi. They had been blamed for previous attacks on the green zone.

The attack came amid a stand-off between security forces and the pro-Iran Shiite militias whose supporters have been camped outside the Green Zone for nearly a month.

They gathered after rejecting the results of Iraq's parliamentary elections, in which they lost around two-thirds of their seats.

"The assassination attempt is a dramatic escalation, crossing a line in unprecedented fashion that may have violent reverberations," wrote Ranj Alaaldin, a nonresident fellow at the Brookings Institution, in a post on Twitter.

Protests turned deadly Friday when the demonstrators tried to enter the Green Zone. Security forces used tear gas and live ammunition.

There was an exchange of fire in which one protester affiliated with the militias was killed. Dozens of security forces were injured. Al-Khadimi ordered an investigation.

Some of the leaders of the most powerful militia factions loyal to Iran openly blamed al-Kadhimi for Friday's clashes and the protester's death. Many of the faction leaders, who together are known as the Popular Mobilization Forces, or Hashd al-Shaabi in Arabic, converged on the funeral held for the protester Saturday.

"The blood of martyrs is to hold you accountable," said Qais al-Khazali, leader of the Asaib Ahl al-Haq militia, addressing al-Kadhimi in recorded comments to supporters. "The protesters only had one demand against fraud in elections. Responding (with live fire) means you are the first responsible for this fraud."

On Sunday, several faction leaders dismissed the assassination attempt, suggesting it may be staged.

Al-Khazali suggested the militias were being framed and called for an investigation.

Other PMF leaders who condemned the attack blamed it on "third parties" seeking to incite strife.

In the strongest criticism of the prime minister, Abu Ali al-Askari, a senior leader with one of the most hardline pro-Iran militias, Kataib Hezbollah, questioned whether the assassination attempt was really al-Kadhimi's effort to "play the role of the victim."

"According to our confirmed information no one in Iraq has the desire to lose a drone on the residence" of al-Kadhimi, al-Askari wrote in a Twitter post. "If anyone wants to harm this Facebook creature there are many ways that are less costly and more effective to realize that."

Brig. Gen. Yahya Rasool, spokesman for al-Kadhimi and Iraq's commander in chief, told the Beirut-based Al-Mayadeen TV that the drone flew in from southeast Baghdad at low altitude and could not be detected by defensive systems.

Influential Shiite cleric Muqtada al-Sadr, who won the largest number of parliament seats in the Oct. 10 elections, denounced the "terrorist attack," which he said seeks to return Iraq to the lawlessness and chaos of the past.

While al-Sadr maintains good relations with Iran, he publicly opposes external interference in Iraq's affairs.

Al-Kadhimi, 54, was Iraq's former intelligence chief before becoming prime minister in May last year.

He is considered by the militias to be close to the U.S., and has tried to balance between Iraq's alliances with both the U.S. and Iran. Prior to the elections, he hosted several rounds of talks between regional foes Iran and Saudi Arabia in Baghdad in a bid to ease regional tensions.

Iran's Foreign Ministry spokesman Saeed Khatibzadeh condemned the assassination attempt on al-Khadimi and indirectly blamed the U.S.

He said in a briefing to be aware of "the conspiracies that target the security and progress of Iraq," without elaborating.

Khatibzadeh said such incidents "are in the interests of those parties that have invaded the stability, security, independence and territorial integrity of Iraq over the past 18 years."

The U.S. strongly denounced the attack.

"This apparent act of terrorism, which we strongly condemn, was directed at the heart of the Iraqi state," said State Department spokesperson Ned Price.

Egypt's President Abdel Fattah el-Sissi on Facebook called on all sides in Iraq to "calm down, renounce violence and join forces to preserve the country's stability."

El-Sissi, French President Emmanuel Macron; Jordan's King Abdullah II and Lebanese Prime Minister Najib Mikati were among leaders who called al-Kadhimi on Sunday.

Saudi Arabia issued a statement of support for stability in Iraq and said it strongly condemned the "cowardly terrorist attack."

The United States, the UN Security Council and others have praised the election, which was mostly violence-free and without major technical glitches.

But following the vote, militia supporters pitched tents near the Green Zone, rejecting the results and threatening violence unless their demands for a recount were met.

The unsubstantiated claims of voter fraud have cast a shadow over the vote. The standoff with the militia supporters has also increased tensions among rival Shiite factions that could spill into violence and threaten Iraq's newfound relative stability.

The election was held months ahead of schedule in response to mass protests in late 2019, which saw tens of thousands in Baghdad and predominantly Shiite southern provinces rally against endemic corruption, poor services and unemployment.

They also protested against the heavy-handed interference of neighboring Iran in Iraq's affairs through Iran-backed militias.

The militias lost some popularity since the 2018 vote, when they made big election gains. Many hold them responsible for suppressing the 2019 protests, and for challenging the state's authority.

------

Associated Press writers Zeina Karam in Vienna, Sarah El Deeb in Beirut, Jon Gambrell and Aya Batrawy in Dubai, United Arab Emirates, and Samy Magdy in Cairo contributed.