Jim Michaels

USA TODAY

Correction: An earlier version of this story misstated Iraqi Prime Minister Nouri al-Maliki's age. He is 64.

BAGHDAD — Embattled Iraqi Prime Minister Nouri al-Maliki announced Thursday night that he is stepping down, ending a political crisis at a time when Islamist militants have seized large swaths of the country and remain on the offensive.

The Obama administration has blamed al-Maliki and his Shiite-dominated government for sparking much of the sectarian strife that has gripped his country, as minority Sunnis have felt alienated and have sympathized with armed Sunni extremists calling themselves the Islamic State.

Al-Maliki made the announcement in an impassioned televised speech to a nation he has led for eight tumultuous years in the wake of the 2003 U.S.-invasion that toppled dictator Saddam Hussein.

He had been under intense pressure from within his own party, other Iraqis, neighbors in the region and the U.S. government to step down.

President Obama's national security adviser, Susan Rice, praised al-Maliki for stepping down and said she hopes the change in leaders "can set Iraq on a new path and unite its people" against the Islamic State militants.

In his speech, al-Maliki thanked the Iraqi people for electing him to office twice. He referred to guiding the country during the country's "democratic experiment" when it emerged from decades of international isolation.

Standing alongside fellow Dawa Party member, Haider al-Abadi, his designated successor, al-Maliki said he was stepping aside in favor of his "brother" so he could "facilitate the political process and government formation."

Al-Maliki, 64, said the decision to back al-Abadi reflected his desire to "safeguard the high interests of the country," adding that he would not be the cause of any bloodshed. "My post is your confidence in me," he declared.

Iraqi President Fouad Massoum, who took office last month, nominated al-Abadi on Monday as the new prime minister, a selection that was endorsed by the Obama administration and allies in the region. But al-Maliki had refused to step aside and threatened to file a court challenge, calling the procedure for choosing his successor unconstitutional.

His refusal to leave office led to a tense political standoff during the past week and fears he would stage a military coup in a country whose history has been shaped by a succession of bloody political transitions.

Al-Maliki's decision to back al-Abadi, who has 30 days to form a new government, will help clear the way for increased U.S. aid. "We are prepared to consider additional political, economic, and security options as Iraq starts to build a new government," Secretary of State John Kerry said this week.

Since the departure of U.S. troops at the end of 2011, in part because al-Maliki would not agree to U.S. terms for keeping U.S. troops in Iraq longer, sectarian tensions have risen sharply. They came to a head in June, when Islamic State militants attacked Mosul, Iraq's second-largest city, and four divisions of the Iraqi army collapsed, abandoned their weapons and fled. The militants captured the heavy arms, much of it provided by the U.S. military, and are now using it against Iraq's troops.

Foreign policy analysts said al-Maliki had appointed Shiite cronies to command positions, undermining the effectiveness of the U.S.-trained and equipped Iraqi armed forces.

Al-Maliki's leadership will be remembered most for its sectarian nature, which destroyed almost everything good he accomplished, said Michael O'Hanlon, a senior fellow at the Brooking Institution.

"His legacy did have some accomplishment and down the road we might be able to say some good things, but at this point, it looks like most of what he built up he also destroyed," O'Hanlon said.

Hakim al-Zamili, a member of parliament and Shiite rival of al-Maliki, said al-Abadi has broad support in Iraq and in the international community. "Al-Abadi will not be a dictator. He saw what happened to al-Maliki," al-Zamili said. "Even al-Maliki would do things differently if he had a chance to do it over."

Yassir Saffar, 33, a Baghdad shopkeeper, said al-Maliki lost all his political support, so his resignation was not surprising. But he called the decision "courageous," since Iraq's political history is marred by so much violence,

Ali Adnan, 37, who works at the Defense Ministry, said al- Maliki lost any hope of ruling Iraq after the militants seized Mosul in June. He said the prime minister acted reasonably by stepping aside, avoiding further conflict and bloodshed.

Contributing: Oren Dorell in McLean, Va.; the Associated Press