TEHRAN — The speaker of Iran’s Parliament, an open rival of President Mahmoud Ahmadinejad, was pelted with shoes and stones in one of Iran’s holiest shrines on Sunday, forcing him to cancel a speech there, the semiofficial Iranian Labour News Agency reported Monday.

The speaker, Ali Larijani, is a leading member of Iran’s most famous political family. He had been scheduled to speak at the golden-domed shrine of Fatima Masoumeh, the daughter of a Shiite saint, to commemorate the 34th anniversary of the Islamic revolution.

The shrine is in the city of Qom, Mr. Larijani’s home district, where most of his political supporters among Iran’s traditional clergy hold offices.

But when he was preparing to deliver his speech, a group of around 100 protesters, described by the news agency as “Ahmadinejad fans,” started throwing shoes and small stones used by Shiite worshipers when they pray, actions that are regarded as gravely insulting. When the protesters pressed toward the stage, Mr. Larijani’s bodyguards took him away.