A suicide bomber struck inside Baghdad’s largest Sunni mosque Sunday evening, killing at least 28 and injuring more than 30, a government official said. Khaled al-Fahdawi, a Sunni member of the Iraqi parliament, was killed in the blast, authorities said.

The attacker, who had explosives hidden in fake casts on his leg and arm, tried to enter the Umm al-Qura mosque in western Baghdad about 9:30 p.m. Sunday but was turned away by suspicious security guards, a mosque official said. The assailant returned a little later, pushed past the guards and detonated his explosives, killing the worshipers as they prayed.

The deaths come after a particularly violent month in Iraq, in which dozens were killed in suicide bombings, targeted assassinations and car blasts. On Aug. 15 alone, more than 80 people were killed in 42 attacks across the country. Fifteen died last week in a series of incidents in Anbar province, west of Baghdad. The insurgent group al-Qaeda in Iraq had vowed to carry out 100 attacks this month to avenge the death of Osama bin Laden, but other militant groups have been active as well.

Omar Saad, 32, a teacher, said he was at the mosque Sunday when he saw a man running up to the front of the room. Then, the explosion — and chaos.

“Everybody was in shock, pushing and trying to leave,” Saad said. “I saw a child with a [wounded] arm crying over the body of his dead father.”

Sunni officials said they suspected that a high-profile religious leader who was at the mosque was the intended target, but he was not injured.

“It was horrible,’’ said Fares al-Mahdawi, a spokesman for the Sunni Endowment, which runs the mosque. “There was a dark cloud of smoke and dust . . . then pushing and shoving.” Many were hurt while trying to escape, Mahdawi said.

The Umm al-Qura mosque is one of the most visible and high-profile mosques in all of Baghdad. It was built during the 1990s by Saddam Hussein to commemorate Iraq’s role in the 1991 Persian Gulf War and was dubbed the “Mother of All Battles” mosque, opening to the public in 2001. Its lofty minarets are in the shape of Scud missiles and the rifle barrels of Kalashnikovs.

After the 2003 U.S.-led invasion, Sunni insurgents took over the mosque. It is now run by the Sunni Endowment, the religious group responsible for Sunni religious sites in Baghdad.

Earlier Sunday evening, three car bombs exploded near the southeastern commercial area of Baghdad, killing one and injuring 10. One of the bombs went off in front of a mosque near a busy area where people were breaking their dawn-to-dusk Ramadan fast and shopping for the Eid holiday, which celebrates the end of the holy month of Ramadan and begins this week.

Majeed is a special correspondent. Special correspondent Uthman al-Mokhtar in Fallujah contributed to this report.