Ahmadinejad was summoned on March 14 by lawmakers who are dissatisfied over his handling of the economy and political management.
Ahmadinejad, whose speech to the chamber was broadcast on state media, told legislators that if his government were judged to be "less than 100 percent, it would be unfair and cowardice."
The defiant Iranian president was asked 10 questions that were read out by one of his staunchest critics, lawmaker Ali Motahari. He responded dismissively and, at times, made jokes.
Some of the questions focused on his differences with Iran's supreme leader, Ayatollah Ali Khamenei -- who has ultimate power in the Islamic republic. Ahmadinejad was asked about his refusal last year, for 11 days, to give in to a demand by Khamenei that he reinstate his fired intelligence minister.
He was also questioned about his 2010 dismissal of an ally of Khamenei, former Foreign Minister Manuchehr Mottaki, who was dismissed during a trip to Senegal. Ahmadinejad denied challenging the supreme leader and said as the president he had the right to dismiss ministers.
The president deflected other questions from lawmakers who challenged him about Iran's high inflation rate, suggesting it was a result of his policies to reduce Iran's subsidies.
In tongue-in-cheek responses, Ahmadinejad denied any wrongdoing and said that price hikes had nothing to do with slashing subsidies.
He told his questioners that he had responded to their "school exam" questions fully and that if they had consulted with him, they could have come up with better questions.
Some lawmakers said Ahmadinejad had not taken the session seriously and had been disrespectful.
"The president's language was insulting during his entire speech," lawmaker Mostafa Reza Hosseini said. "He escaped answering the questions. As predicted, we did not receive any logical answers from the president."
Did Ahmadinejad Win?
That the session was held at all was seen as a blow to Ahmadinejad's standing, which already has been weakened by a power struggle with Khamenei.
But some analysts have suggested the combative president had the upper hand in the session.
"Ahmadinejad managed to diminish the importance of the questions; some of them were from a few years ago, the public is not interested in them," London-based political analyst Asghar Ramezanpour told RFE/RL's Radio Farda.
"Ahmadinejad and his government have pursued a policy of gradually weakening the parliament and it seems that it [the government] has also been supported by Khamenei, because it seems he wanted Ahmadinejad to be questioned at a time when it has the least impact."
In fact, lawmakers have been threatening for the past year to summon Ahmadinejad to the parliament for questioning. Only in February did enough sign the petition necessary to summon him.
Eleven lawmakers subsequently withdrew with their signatures, leading to speculation that the motion would be canceled. But the parliament's presiding board ruled on March 13 that the questioning should go ahead.
While Ahmadinejad was being questioned, clashes between his supporters and opponents were reported outside the parliament.
The semi-official ILNA news agency reported that the police intervened to stop the scuffle.