BAGHDAD | A suicide bomber struck Shi’ite worshippers Friday at a mosque run by followers of anti-American cleric Muqtada al-Sadr, killing at least 12 people, a day after Iraqi lawmakers approved a security pact with the United States.

The blast underlined fears on both sides of the argument - proponents of the deal warn the Iraqis aren’t ready to take over their own security while opponents, led by the Sadrists, say the American presence is the main reason for the instability plaguing the country.

In Baghdad, thousands of al-Sadr loyalists took to the streets to rally against the deal in the main Shi’ite district of Sadr City.

The bomber blew himself up among a group of men waiting to be searched near the green iron gate at the entrance of the main mosque in Musayyib, 40 miles south of Baghdad.

Worshippers - who had planned a protest against the pact after services - rushed outside or stood against the walls for protection against a possible roof collapse.

“When I reached the door … I found it very hard to get away without stepping on bodies,” said Hadi Radhi, a 40-year-old construction worker. “We could not tell if they were dead or wounded.”

Police and hospital officials said 12 people, including a woman who was begging for money nearby, were killed and 18 wounded. The U.S. military said eight civilians were killed and 15 wounded.

There was no claim of responsibility, but suicide bombings are associated with Sunni extremist groups. The U.S. military has warned Sunni insurgents are trying to provoke revenge attacks by Shi’ites in order to reignite sectarian warfare.

The mosque was formerly Sunni, but had been taken over by the Sadrists after the 2003 fall of Saddam Hussein’s Sunni-dominated regime, officials said.

The security pact, which still must be approved by the three-member presidential council, was backed by the ruling coalition’s Shi’ite and Kurdish blocs and the largest Sunni Arab bloc, which wanted concessions for supporting the deal.

But Mr. al-Sadr, who commands a large following among impoverished Iraqi Shi’ites and a 30-seat bloc in the 275-seat parliament, rejected the pact and said U.S. troops should withdraw immediately.

Mr. al-Sadr, who lives in Iran, issued a separate statement via his spokesman Sheik Salah al-Obeidi calling for three days of mourning and peaceful public protests as a show of opposition against the agreement.

In Tehran, a hard-line Iranian cleric said the Iraqi parliament approved the deal under U.S. pressure but “did well” in deciding to put it to a referendum. The cleric, Ayatollah Ahmad Jannati, was referring to the decision by Iraq’s Shi’ite bloc to agree to a Sunni demand that the pact be put to a nationwide referendum by July 30.

A car bomb also exploded in a central square in Baghdad, killing at least three people and wounding 13, according to police and hospital officials.