BAGHDAD — Despite mounting pressure to step aside, Iraq’s Nouri al-Maliki vowed Friday not to abandon his bid for another term as prime minister and pledged to stay on until the Sunni militants who have overrun much of the country are defeated.

The sharp words are certain to prolong the political impasse gripping Iraq, which is facing urgent demands for a new government that can hold the nation together in the face of an onslaught that threatens to cleave it in three along ethnic and sectarian lines.

The offensive by militants who have swept across much of northern and western Iraq since last month has been fueled in part by grievances among the country’s Sunni Muslim minority with al-Maliki and his Shiite-led government.

Al-Maliki, a Shiite who has been prime minister since 2006, has been accused by former allies and others of monopolizing power and contributing to the crisis by failing to promote reconciliation with Sunnis.

The U.S. has urged the formation of a more inclusive government but has not explicitly called for al-Maliki to bow out.

In what has been seen as a rebuke of al-Maliki, Iraq’s top Shiite cleric, the Ayatollah Ali al-Sistani, has pressed lawmakers to quickly form a new government that can confront the militant threat and unite the country. Lawmakers failed in their first session of parliament Tuesday to make any progress.

On Friday, al-Sistani lamented the inability of political leaders to agree on a new prime minister and urged them to redouble their efforts, a cleric who represents him told worshippers in a sermon in the holy city of Karbala.

Al-Maliki’s State of Law bloc won the most parliamentary seats in April elections, which would traditionally make him the leading candidate to head the government. But he failed to gain a majority in the legislature, meaning he needs allies to form a government.

Al-Maliki made clear on Friday his determination to stay on for a third consecutive term — or at least until he has crushed the insurgency

“I will never give up the nomination for the post of prime minister,” he said in a statement issued by his office.