Tehran (CNN) -- Iran's President Mahmoud Ahmadinejad was quizzed by lawmakers Wednesday on domestic and foreign policy issues after being summoned before parliament.
It was the first time since the Iranian Revolution in 1979 that the parliament had summoned the country's president to answer questions.
The move came after a power struggle between Ahmadinejad and Supreme Leader Ali Khamenei spilled into public view last year.
Many lawmakers have been upset by Ahmadinejad's management of economic policies and key government ministers.
Their representative, Ali Motahari, had 15 minutes to pose a series of questions to the president.
Ahmadinejad then had about an hour to respond, during which he answered most of the points. But critics afterward complained that he had not taken the session seriously.
The president was asked about how his administration had handled the economy and why he had not helped the mayors of Tehran and elsewhere as expected.
He responded that he had done so, saying he had earmarked the equivalent of $2 billion for that purpose but the money had not been used.
Ahmadinejad was also asked why he had sacked former Foreign Minister Manouchehr Mottaki while he was on a mission to Senegal. Ahmadinejad replied that Mottaki had been told that he was no longer the foreign minister before he went to Senegal, and should not have gone there at all.
Lawmakers also quizzed him about his failed attempt to fire Intelligence Minister Heidar Moslehi in April. When Khamenei vetoed the move, Ahmadinejad retreated from the public eye for 11 days, skipping Cabinet meetings.
Asked about that absence, Iran's Press TV quotes the president as responding: "It was said I stayed at home for 11 days. This is one of those things! Ahmadinejad staying home and resting? Most people tell us rest for one day and make time for yourself."
Motahari asked him to explain why the president had not stopped a close adviser of his, Esfandiyar Rahim Mashaei, from promoting nationalism as opposed to the concept of unity among Muslims.
Motahari also objected to the president's views on enforcing the wearing of head scarves and other Islamic rules.
Ahmadinejad said that he believes that cultural issues cannot be resolved by force and aggression. Rather, the people must be educated and abide by those rules of their own accord, he said.
"Cultural approaches are incompatible with harsh methods. Is it wrong to say do not be so strict with boys and girls? These are our own children. Youths must be respected," Press TV quotes him as saying.
The president finished by urging lawmakers to award him a top grade for his performance.
"We answered the questions and said some extra things. It would be unfriendly and disrespectful if you give (me a mark) less than an A," he said, according to Press TV.
After Ahmadinejad left parliament, several lawmakers complained that he had insulted them by taking a casual attitude regarding his "breaking the law" while in office.
They criticized Speaker Ali Larijani for not warning the president about his attitude in parliament.
As he answered the lawmakers' questions, Ahmadinejad repeatedly said: "I am joking with you. After all, it is the new year and we should be jovial."
The lawmakers complained to Larijani that affairs of state are not a joke. They accused the president of taking the session very lightly and simply repeating his usual arguments rather than properly answering the questions.
At one point, Ahmadinejad suggested it might have been better had they just met informally for a chat.
He left parliament immediately after speaking, according to Iranian Radio (IRIB).
Ahmadinejad also made clear that he was not there by choice.
"The fact is that I tried not to attend this session, but I guess it was ordained (was Kismet) that I should come," he is quoted by the semi-official Fars news agency as saying. "The parliament's presiding board had also decided that I should come, so there was nothing I could about it. I follow the decisions of the presiding board."
Khamenei, the ultimate authority in the Islamic republic, gained ground in his power struggle with Ahmadinejad earlier this month as many of the candidates he backed came out on top in parliamentary elections.
It was the first time Iranians had voted since allegations of rigging in the 2009 elections triggered mass street protests against Ahmadinejad's re-election as president.
Many observers said the underlying issue of the election was whether voters backed the president, who has been embroiled in growing rivalry with Khamenei.
Khamenei publicly supported Ahmadinejad's controversial re-election victory during the dispute over the 2009 ballot results.
But tensions have flared between the two leaders over the past year, particularly since the supreme leader overruled the president's decision to fire the intelligence minister.
The internal political tensions have coincided with increased outside pressure on Iran from the United States and other countries over Tehran's nuclear program.
CNN's Mitra Mobasherat contributed to this report.