Groups shouted slogans such as "Khatami, what happened to your promised freedoms?" and "Khatami, shame on you", as the cleric attempted to address some 1500 students at Tehran University on Monday.
The speech, held to celebrate Iran's annual Students Day, marked a low point in Khatami's relations with students, who were once the backbone of Iran's reformist movement and were a major force in his stunning electoral victories of 1997 and 2001.
Now nearing the end of his second and final term, which concludes in mid-2005, Khatami has lost the backing of even some of his most ardent supporters, many of whom feel he has failed to stand up to hardliners who have blocked his efforts at reform.
"Unfortunately what Khatami sees as his tolerance, on the contrary was his extreme weakness towards the opponents of democracy," read part of a statement distributed by one pro-reform student group at the meeting.
Visibly shaken by the students' anger, the president defended his record and criticised powerful hardliners who have jailed dissidents, closed newspapers and rejected key reform bills.
"My period is going to be over soon but I do not owe anyone," he said. "Those power-seeking fanatics who ignored the people's demands and resisted reforms, they owe me. The ones who destroyed Iran's image in the world, they owe me."
Khatami responded to jeers with
Analysts say Khatami, once seen by the West as a potential leader of change in the Islamic republic, is serving out his final months as a virtual political lame duck.
Conservatives opposed to any watering down of the country's Islamic laws and the clerical grip on power are poised to regain the presidency in elections next year after taking control of parliament in a vote in February this year.
At times applauded and at others jeered by the boisterous crowd jammed into a lecture theatre, Khatami lashed out with uncharacteristic anger when chants interrupted his speech.
"Just stop it. I will tell them to throw you out," he said. "You are unable to tolerate anything, even words," he said.
Later he said that despite restrictions on free speech in Iran, where more than 100 publications have been muzzled in the past four years, the situation was better than in many countries.
"Students are very disappointed because they paid a heavy price for supporting Khatami, but in return they got nothing"
Student leader Momeni
"There is no Third World country where the students can talk to their president and criticise the government as you do now."
He said he still believed the path of reform would succeed.
"I really believe in this system and the [1979 Islamic] revolution and that this system can be developed from within."
But for most present, Khatami's words merely underlined the impotence of a man whom they now view as part of a system unwilling to accept real change.
"Khatami himself is responsible for the problems created in the country," said Zahra, 19, a mechanical engineering student.
Student leaders, many of whom have been jailed for taking part in pro-democracy protests in recent years, said the president had failed to stand by them.
"There is no difference between him and the authoritarians," prominent student leader Abd Allah Momeni said. "Students are very disappointed because they paid a heavy price for supporting Khatami, but in return they got nothing."
Many students, who make up a key part of the electorate in a country where two thirds of people are under 30 and the voting age is 15, say their disillusionment with Khatami's failed promises means they will not vote in next year's elections.