KABUL (AFP) - A top judge in Afghanistan's counternarcotics court, working to bring to justice key players in the world's biggest opium-producing country, was gunned down in Kabul Thursday, his office said. Gunmen shot dead Alim Hanif, chief judge of the Central Narcotics Tribunal appeals court, soon after he left home to go to work, the Counter Narcotics-Criminal Justice Task Force (CJTF) said. "Judge Alim Hanif was shot on his way to work and later died of his injuries in hospital," it said in a statement. Hanif, aged between 50 and 60, was described as having a distinguished legal career and being widely respected for his honesty in a notoriously corrupt sector. "He was motivated by bringing influential drug traffickers to court and seeing them punished for their crimes," Counter Narcotics-Criminal Justice Task Force (CJTF) prosecution director Ramatullah Nazri said in the statement. Afghanistan produces more than 90 percent of the world's opium, most of which is turned into heroin inside the country and is said to in part finance an extremist Taliban insurgency. Top government officials and other former warlords are said to be involved in the multi-billion-dollar-a-year industry, although most kingpins have escaped justice. The government set up the Counter Narcotics-Criminal Justice Task Force (CJTF) in 2005 with the aim of prosecuting serious drug-trafficking offences. "Police are investigating the motives for his death but we think it is in relation to the job he was doing," the task force's communication director, Sareer Ahmad Barmak, told AFP. The judge was shot in the heart, he said. "He was one of the very rare judges, especially in relation to counternarcotics, who would never accept bribes, would never be influenced by pressure from government authorities, who was not corrupt," Barmak said.