A minister reminded Dr Mahathir Mohamad that the role of the attorney-general has not changed since his time in power.
Salleh Said Keruak pointed this out in his response to the former premier's criticism of Mohamed Apandi Ali.
The communication and multimedia minister said Mahathir's "misleading" remarks about Apandi gave the impression that the AG did something wrong or overstepped his role.
On the contrary, Salled said Apandi did exactly what his job demanded that he do.
"And this is also precisely how things were done during Mahathir's watch as prime minister as well - no more and no less," he added in a blog posting.
Mahathir criticised Apandi over his decision not to prosecute Prime Minister Najib Abdul Razak based on the findings by the Malaysian Anti-Corruption Commission (MACC).
The former premier said that in Malaysia, the AG decided if a law had been broken or otherwise.
"That decision is in fact a judgment. The AG is both a judge and a prosecutor. This in itself is an injustice," he added.
However, Salleh said he expected someone like Mahathir who had been prime minister for 22 years and other members of Parliament to be proficient about the law and know the function, role and responsibilities of an attorney-general.
He pointed out that like other agencies, MACC merely had the power to investigate based on suspicion that a crime had been committed.
"They then submit the investigation report to the AG, who then decides whether a crime was committed and if so whether there is enough evidence for the case to be brought to court and/or for a conviction to be obtained.
"This has always been the case since 1243 when the post was first created in England and in 1461 when the attorney-general took on the political role of adviser to the government and 1673 when he became the adviser to the prosecution department.
"Basically, Malaysia practises British law and the post of attorney-general in Malaysia is the same as that in England," he said.
Salleh said the AG looks through the merits of each case and after scrutinising the investigation report and the evidence, he would decide whether there is a case and whether it needs to be brought to court.
"They should not try to make it appear like this is something out of the ordinary when this is precisely how things are done and have been done since the beginning," he added.