Early one morning in 2014, public health officials arrived at Anthony Wainaina's workplace in Mwea town in Kenya's Kirinyaga County, and arrested him.
His crime - defaulting on his tuberculosis (TB) treatment, which would see him serve a two-year jail term.
The 31-year-old matatu tout was diagnosed with multi-drug resistant (MDR) -TB and was put on a 20-month treatment plan. But six months into the regimen, he felt better and stopped taking the drugs. The officers arrested him a week later.
"I did not know that it was illegal for me to have stopped taking the drugs," said Mr Wainaina.
"I told the court the drugs were too many and made me weak and dizzy, while the pain from the injections was unbearable. But they said that it was up to the court to make a decision on that."
Mr Wainaina's daily regimen was 15 tablets and kanamycin injection - used to treat serious bacterial infections - administered in the hospital under the watch of a health officer.
The World Health Organisation (WHO) requires that MDR- TB patients are supervised directly in order to increase adherence to medication.
MDR-TB is caused by bacteria that are resistant to at least one first-line anti-TB drug. Treatment takes longer than normal TB.
The court sentenced Mr Wainaina to two years in prison to complete his treatment and serve the punishment for defaulting.
That was then, when TB patients who defaulted were kept in isolation cells in prison to complete their treatment, after which they were ushered into the prison routine alongside other inmates.
That policy changed on March 24, 2016 when the High Court of Kenya declared such confinement illegal and unconstitutional, in a ruling in which the sentencing of two brothers in Kapsabet in Nandi County in the Rift Valley was overturned.
The court directed the Ministry of Health to issue a circular clarifying that infectious patients should be confined in health facilities and not in prison cells, and develop a TB policy that aligns with global best practises. It was launched recently.
In the case involving the two brothers -- Daniel Ng'etich and Patrick Kipng'etich -- they were arrested in 2010 and sentenced to one year in jail each for defaulting on their TB medication.
Mr Ng'etich told CNN that he had taken his TB medication for two months and stopped after his health improved, but he did not know that he was to take it for six months continuously.
"The drugs were too many and every time I took them I felt weak. So I decided to stop taking them once I felt better," said the 45-year-old.
"But I did not know I was committing a crime."
The two brothers had served two months of their prison terms before the advocacy organisation Kelin secured their early release.
HIV/TB programme manager at Kelin Lucy Ghati, said they moved to court challenging the verdict arguing that incarcerating TB patients was a violation of their right to dignity, freedom of movement and protection from torture.
"Isolating TB patients in prisons is dangerous to the prison population too as there are no precautions taken to prevent the spread of the disease within the facility," said Ms Ghati.
Following Kelin's petition, the court directed that the government develops a policy that is cognisant of international human-rights.
"Not only is such action not sanctioned by the Public Health Act, it is also patently counterproductive," said Justice Mumbi Ngugi in her ruling.
For a long time Kenya had been locking up TB patients like Mr Wainaina who default on treatment in prison cells.
"The law authorised public health officers to take whatever action they deemed necessary -- including detaining infectious patients -- to prevent the spread of diseases," said Samuel Misoi, the assistant director of public health at the National Tuberculosis, Leprosy and Lung Disease Programme.
The Public Health Act CAP 242, section 17 classifies TB as a notifiable infectious disease and under section 26 as part of prevention and control of infectious diseases, those exposed or suffer from the notifiable infectious diseases should be isolated in a designated place and detained while taking medication until in the assessment of the medical officer of health confirms that the person is free from infection or able to be discharged without danger to public health.
The head of Mwea Prison said that even though the TB patients would take their medication diligently under supervision, they were a risk to the other inmates, forcing them to raise this concern with the Ministry of Health.
"These were not criminals and it was not right for them to be held in prisons. Prisons do not have specialised facilities like those in hospitals, neither do they have medical experts to handle complicated cases like MDR-TB," said Mr Tari.
According to Andrew Owuor, a specialist at the respiratory and infectious disease unit at the Kenyatta National Hospital in Nairobi, many patients fail to complete their drug courses MDR-TB because the treatment takes longer and has many more side effects.
"Only about half of them end up TB-free," said Dr Owuor.
The WHO in its End TB Strategy notes that involuntary isolation of patients should only be applied as a last resort and never as punishment.
The Kenya TB isolation policy builds on this, outlining procedures to be followed when admitting persons with TB who interrupt or refuse to take their medication and factors to be considered before enforcing isolation.
"It emphasises a patient-centred and rights-based approach to TB prevention, treatment and management," said Dr Misoi.
It offers both voluntary and involuntary isolation. The policy promotes human-rights, protects the dignity of the patient and the public from the infectious disease.
Isolation only applies to a known TB patient who has refused effective treatment and all reasonable measures, a patient who has agreed to outpatient treatment but lacks the capacity to institute infection control at home, and one who has additional and/or severe health condition that requires in-patient care including MDR-TB, drug-resistant TB (XDR-TB), pre-XDR-TB and drug users.
There are only three isolation wards in Kenya -- Kenyatta National Hospital, Homa Bay Hospital in Nyanza, western Kenya and Moi Teaching and Referral Hospital in Eldoret in the Rift Valley.
TB advisor at the WHO Enos Masini said that the new policy aligns with the WHO guidelines as it is both patient-centred, and provides a more ethical and human-rights approach to isolation of TB patients.
"The patient is only admitted if severely ill or has such symptoms. For patients with drug-sensitive TB, isolation is only justifiable in few instances where despite all efforts the patient remains non-adherent to his medication and must be directly supervised," said Dr Masini.