For weeks now, the front pages in Azerbaijan have been full of sensational details about Mammadov's alleged crimes.
Media recounted details of Mammadov's claim that he had once tortured a man by stabbing him in the liver and twisting the knife. Mammadov, a former chief inspector in an Interior Ministry criminal division, said he told his victim he would see him in another world and continue the torture.
Mammadov is in court, facing charges of kidnapping and murder. Prosecutors say that over a period of 10 years he ran a gang of over two dozen people that carried out a series of abductions for ransom and contract killings.
It was only during the trial that Mammadov confessed to the murder of Elmar Huseynov, a prominent and outspoken journalist and critic of the government.
In a statement from his prison cell, Aliyev said he had been warned that if he continued to refuse to plead guilty to the coup charge, he would be implicated in the killing of Huseynov.
It is a claim many have rubbished, saying Mammadov testimony isn't reliable. International watchdog Reporters Without Borders warned prosecutors and judges to be "suspicious" of the confession.
Huseynov was gunned down outside his apartment on March 2, 2005.
Former Minister Implicated
The case has whipped up a storm with Mammadov saying that former Economic Development Minister Farhad Aliyev ordered the killing.
Aliyev, who is no relation to Azerbaijani President Ilham Aliyev, fell from grace in late October 2005 and was subsequently arrested and charged with plotting to overthrow the Azerbaijani leadership.
The country's prosecutor-general has since appeared on national television and produced what he claimed was Aliyev's address book that contained Mammadov's telephone number.
Aliyev has strongly denied Mammadov's claims. In a statement from his prison cell, he said he had been warned that if he continued to refuse to plead guilty to the coup charge, he would be implicated in the killing of Huseynov.
The skullduggery aside, Azerbaijanis are asking the question of how such a gang could have operated for so long -- and with such impunity.
Quenimet Zahidov, the editor of the opposition "Azadliq" newspaper, says the case raises difficult questions.
Huseynov was a critic of the government
"If, in this country, the Economic Development Ministry had information about the crimes of Haci, and even if the ministry ordered it [then] that means that all the big and powerful ministries knew about these crimes," Zahidov says. "And that gives reason to say that the whole government system of Azerbaijan has used Haci Mammadov for one or another purpose."
It is likely that someone in the upper circles of power knew about Mammadov's crimes. But the question is who?
The Interior Ministry and the Prosecutor-General's Office are blaming each other.
And a former colonel, Arif Aliyev, who was dismissed from the Azerbaijan Interior Ministry in 2001, has said that the Interior Ministry could not have remained ignorant of the crimes Mammadov and his gang committed.
Mammadov's lawyer, Semed Aliyev, says he does not hold much hope of a fair trial. "I know all these judges and they are all objective. But there are situations when even the courts are helpless," Aliyev says.
More than anything, the trial has shown how law-enforcement agencies are infested with corruption and linked with organized crime. Or as one Azerbaijani journalist put it: "Killers with a badge."
(RFE/RL analyst Liz Fuller, correspondent Luke Allnutt, and RFE/RL's Azerbaijani Service contributed to this report.)