At the beginning of December Najib’s 10-week-old daughter fell ill, crying with stomach ache late into the night. The next day her chest seemed to hurt, so Najib took her to the doctor, who prescribed paracetamol for the pain, phenobarbital for sedation and the antibiotic cefixime to kill potential bacteria.

But over the next few days the baby’s health deteriorated. “She was healthy. We did not expect that this disease would affect her like that,” Najib, 30, said. Years ago, when the family was living in Pakistan, other children in the family with similar ailments had been treated effectively with small doses of paracetamol and antibiotics.

On the fourth night the child stopped feeding. When she woke up, “her eyes were not in the normal position”, Najib said. He took her to the hospital in Jalalabad, in eastern Afghanistan, where doctors gave her oxygen. After five minutes, she died. The family buried her the same day, Najib said. He blames the drugs. “The medicine company and the doctors claim that this is quality medicine, but it doesn’t give any result,” he said. “There is no quality medicine here in Jalalabad. For any disease.”

Najib’s family are not the only Afghans to blame poor-quality drugs for making diseases worse. Every day illegal medicine flows from Pakistan into eastern Afghanistan. “The market is full of low-quality or fake medicines,” said Khushal Tasal, regional director of the Afghan Doctors’ and Medical Professionals’ Association, a civil society group.

About half of Afghanistan’s pharmaceutical imports are smuggled and not subject to quality control, according to a recent report by the Independent Joint Anti-Corruption Monitoring and Evaluation Committee (MEC), a watchdog assembled by the international community and the Afghan government. The combined value of illegal and legal pharmaceuticals is $700m (£445m) to $880m.

Corruption at customs opened up the country to counterfeit, inferior medicine. Because of its proximity to the largely uncontrolled 1,600-mile border, the biggest market is Nangarhar province and its capital, Jalalabad, where fake drugs seamlessly enter the medicine stock, making it virtually impossible for non-specialists to distinguish between good and bad products.

When donkey carts and motorcycles kick up dust, the dealers cover the drugs with a piece of cloth, but otherwise do little to protect them against the heat and grime.

“There is no policy regarding registration of medical companies in Afghanistan, and no monitoring of companies in the provinces,” said Ajmal Pardis, a former director of public health in Nangarhar and an adviser to the US Centers for Disease Control and Prevention.

The MEC report says corruption and inadequate licensing standards have led to “huge numbers of companies producing low-quality pharmaceuticals”.

“They don’t take care of these poor children,” Pardis said about the illicit pharmaceutical traders and the doctors who prescribe their products. “These innocent people, they are the victims.”

Those who can afford to, travel to Pakistani cities such as Peshawar to buy medicine. When Pardis’s child was suffering from septic arthritis, he crossed the border for treatment.

Low-quality and counterfeit medicines not only damage the health sector’s credibility, according to Tasal, they also impoverish people who have to seek help from a doctor or travel abroad for treatment.

There are individuals in Afghanistan who buck a system that appears rigged against the poor and the sick.

Fawad Khan Azizi is a private GP in Jalalabad who ran for Nangarhar’s provincial council in national elections this year on a promise to root out counterfeit medicine. Illicit medicine comes in two types, Azizi told the Guardian at his small clinic. The first is completely fake. The second contains a small dose, say 20%, of the stated medicine, and this type can be most harmful, he said. Too small a quantity of an antibiotic, for example, will not only fail to treat an infection effectively but risks making the bacteria drug-resistant. “The packing looks perfect but the product is harmful,” Azizi said.

Fawad Khan Azizi ran for Nangarhar’s provincial council national elections on a promise to root out counterfeit medicine. Photograph: Andrew Quilty / Oculi :: aquilty/Andrew Quilty / Oculi

A few weeks ago the mother of an acquaintance had been taking medicine bought in Pakistan to relieve the pain of stomach cancer. When she ran out, her son began buying it in their village. Two hours after her first dose, she started vomiting, said Azizi, who then gave her medicine from his own clinic. The woman immediately felt better, he said.

Although there are some quality control measures in place for medicine in the public healthcare system, implementation is weak, according to a US-funded report on pharmaceuticals in Afghanistan. However, most medicines are prescribed and sold privately, and there is no data on pharmacists working in the private sector, the report adds.

According to Pardis, corruption pervades the public healthcare system went all the way down to hospitals’ procurement departments, where companies bought off doctors to sell products they know are substandard. Without standardised treatment practices, or funds for research, most doctors prescribe medicine irrationally and with unnecessary vigour, he said.

That seems to have been the case in the death of Najib’s baby. Phenobarbital, which the doctor prescribed as a sedative, is often used to treat epileptic seizures. It can cause hypoventilation and, therefore, would be risky to give to an infant with respiratory problems. “Here we give patients shotgun therapy. Any kind of medicine, we prescribe it,” Pardis said.

There is no Afghan government research into the scale of the sale of illicit medicine. One of the few quantitative analyses – conducted by MEC – says the Afghan health ministry is partly to blame.

Up to 300 companies based in Pakistan make medicine specifically for export to Afghanistan, which does not require the standards demanded by their own government for drugs used in Pakistan, says the report. These companies account for about 60% of all pharmaceuticals on the market, says the MEC.

In total, 450 foreign pharmaceutical suppliers are registered with the health ministry in Afghanistan, which has a population of 31 million people. In comparison, India, which has a population of more than 1.2 billion, has about 100 registered foreign medicine suppliers.

One of the main election promises of the newly elected Afghan president, Ashraf Ghani, is to root out corruption. That would stem the flow of counterfeit drugs into Afghanistan. But he has yet to present a clear plan of how to do so.

USAid officials estimate that corruption robs Afghan government of up to 50% of its customs revenue. Without tackling corruption at the border and within Afghanistan’s healthcare system, counterfeit medicine will remain a lucrative business for Jalalabad’s street dealers.

“Everyone is a trader,” Pardis said. “Any farmer can put on a white shirt, and then he is a pharmacist.”

Some names have been changed