TEHRAN, Iran — Students disrupted a speech by President Mahmoud Ahmadinejad on Monday at a major university in Tehran, setting fire to photographs of him and throwing firecrackers.

The protesters chanted "death to the dictator" and demanded the resignation of Alireza Rahai, a conservative and the chancellor of the institution, Amirkabir University, the Iranian Student News Agency reported.

Rahai was appointed to the post after Ahmadinejad was elected. Amirkabir, a polytechnic university in downtown Tehran, has been a center of student dissent.

It was the first major public protest against Ahmadinejad since his election more than a year ago.

Ahmadinejad cut his speech short and left as his security guards tried to stop angry students, who kicked at the car that carried him away, witnesses said. The guards did not remove the students or use force to stop the protests.

Since Ahmadinejad took office, government pressure has increased on Iranians who have actively promoted changes to create a more open society. As part of the crackdown, dozens of university students around the country have been barred from taking classes this year, and a substantial number of professors have been demoted or forced to resign.

A major reformist newspaper, Shargh, was shut down in September and several of its veteran journalists were barred from working. The government has blocked thousands of news Web sites and blogs in an effort to limit the access of Internet users to independent news outlets.

Over the summer, Rahai, the university chancellor, had the office of a reformist student group, the Islamic Association, leveled by a bulldozer.

In his speech Monday, responding to the protests, Ahmadinejad said, "Everyone should know that Ahmadinejad is prepared to be burned in the path of defending freedom and truth."

When the students chanted, "death to the dictator," he said, "Today, the worst type of dictatorship in the world is the American dictatorship, which has been clothed in human rights."

He added, "Our students are free and they fight and die but do not accept the foreigners' mission or bend to them."

The student news agency reported that one reformist student complained to Ahmadinejad that the president's supporters in the audience, who clashed with the protesters, had been bused in from other places. Another student was quoted as saying to him that the security apparatus at the university would probably be busy in the next few days dealing with the protesting students.

In a statement carried on the students' Web site, advarnews.com, they announced that they had been protesting the growing political pressure under Ahmadinejad, also accusing him of corruption, mismanagement and discrimination.

"The students showed that despite vast propaganda, the president has not been able to deceive academia," the statement added.

About 1,000 students at Amirkabir also protested Sunday to denounce the increasing pressure on the reformist group at the university, newspapers reported Monday.

Last week, 2,000 students protested at Tehran University on the country's annual student day, with speakers saying there had been a crackdown on dissent at universities since Ahmadinejad was elected.