BAGHDAD — Tens of thousands of Iraqis, with support from Shiite religious authorities and the country’s president, gathered in the center of the capital on Friday in the largest of a month’s worth of antigovernment protests.

Two demonstrators were killed, but pronouncements from religious and political leaders appear to have staved off a repeat of the violence of the early days of the demonstrations, when security forces killed nearly 150 protesters.

The religious authorities said Friday that the government should protect peaceful protesters who have called for an end to corruption and a change in leadership, a message that was echoed by President Barham Salih.

Although casualties were down and the security forces appear to have exercised restraint, the respite rests on a knife’s edge.