A pledge this week by Iraq’s Shiite prime minister to seek consensus on whether U.S. troops should stay or go came with a not-so-subtle challenge to an influential fellow Shiite.

If a solid majority of Iraq’s main political blocs decide to back a U.S. presence beyond a year-end deadline, Nouri al-Maliki said, then even the anti-American cleric Moqtada al-Sadr should abandon plans for renewed violence and fall in line.

“That is the mechanism of democracy,” he said.

His remarks carried an implicit threat: If Sadr balks at Maliki’s ultimate decision on the U.S. troops question, he risks a repeat of the prime minister’s 2008 order sending the Iraqi army to crush Sadr’s Mahdi Army militia.

“Maliki’s comments cannot be read as anything other than a direct political challenge to Sadr,” said J. Scott Carpenter, who served as deputy assistant secretary of state during Sadr’s rise and his militia’s fiercest clashes with U.S. forces. “The basic agreement that led to the governing coalition — that allowed Sadr to throw his support behind Maliki — is now breaking down.”

That fragile alliance reached in the fall between Maliki and Sadr was predicated, Sadrists say, on their fellow Shiite following through on a three-year-old U.S.-Iraqi agreement that calls for all American forces to leave the country by Dec. 31.

With the Maliki-Sadr relationship fast approaching a tipping point, the firebrand cleric wasted no time Friday in responding to Maliki’s challenge.

For the first time since returning to Iraq after nearly four years of self-imposed exile in Iran, Sadr took to the pulpit and delivered an unannounced sermon at Friday prayers in his southern stronghold of Najaf.

In a forceful political message that prefaced his religious sermon, Sadr employed some of his strongest language yet against a U.S. troop extension.

“We appeal to all Iraqi people to expel the U.S. troops from Iraq through demonstrations and marches,” he said. “We will not accept the occupation’s troops staying, not even for one day after the end of this year.”

But after the sermon, Sadr returned to the troop issue and hinted for the first time that he might not necessarily renew armed resistance.

If all of Iraq’s political blocs decide to support a U.S. troop extension, he said, he may reevaluate whether to lift a 2008 order halting attacks by his militia.

“The matter of the lifting of the freezing of the Mahdi Army is connected to the public and political agreement among Iraqis,” he said.

In a statement last month, Sadr strongly suggested that violence against Iraqi and U.S. forces could be the only appropriate response to an extension.

Analysts said Maliki’s apparently successful effort to draw out Sadr now, at the beginning of what he predicted Wednesday would be a months-long political debate, may prove to be a critical move.

“It’s definitely smarter now than when the threat of U.S. troops is imminent at the end of the year,” Carpenter said, adding that it will allow Maliki to see whether Sadr will actually resort to violence. “Personally, I think Sadr has been bluffing, and Maliki is calling his bluff.”

Mehdi Khalaji, a senior fellow at the Washington Institute for Near East Policy, partially agreed. Sadr’s movement has evolved in the past two years, he said, spearheaded by suit-wearing politicians in Baghdad and focusing on community support for his followers in the south. Sadr has spent much of the past month acting more like a political leader than a militia boss, meeting with regional officials about electricity shortages and government services.

“It may be difficult for him to deny the responsibility of his party,” Khalaji said. “We should expect some change in Sadr’s policy.”

Some analysts saw Maliki’s challenge more as a deftly timed decision to flex Iraq’s muscle against Iran — for whom Sadr is widely viewed as a proxy — while it is distracted by political infighting in Tehran and upheaval in its ally Syria.

“Iran is afraid of what’s going on in Syria, and the internal conflict in Tehran is making its way to Baghdad in some way,” said Babak Rahimi, an Islamic studies professor at the University of California at San Diego, who returned last month from Iran. “If you read the newspapers in Iran, the country is much more involved in its own economic and political problems.”

Still, many also voice caution about Maliki’s true views on the U.S. troop extension, questioning whether he wants a continued presence.

One close observer of the prime minister said, “All of this may yet be an elaborate scheme so that Maliki can come out later and say, ‘See, we can’t reach an agreement to keep the Americans.’ ”

Special correspondents Saad Sarhan, Aziz Alwan and Asaad Majeed contributed to this report.