BAGHDAD — Under pressure from a growing number of protesters, Iraq’s prime minister appeared likely Wednesday to step down in the coming days, although exactly when is the subject of negotiations between two powerful Shiite Muslim leaders.

In a letter to one of the men, the cleric Moktada al-Sadr, Prime Minister Adel Abdul Mahdi said he would be willing to resign and call early elections. But Mr. Mahdi insisted that it be done according to the procedures in the Constitution.

“It is not enough for the prime minister to go to Parliament to announce early elections,” Mr. Mahdi wrote on Tuesday, saying that there were constitutional requirements “that the prime minister must abide by.”

The prime minister did suggest another path, saying, “If the goal of the elections is to change the government, there is a shorter way to do it.” He encouraged Mr. al-Sadr, who controls the largest bloc in Parliament, to work out an agreement with the man who controls the second-largest bloc, Hadi al-Amiri.