A British journalist has won a four year battle against her deportation from Kenya.
Lucy Hannan was permitted to stay in the county after the High Court ruled it was unprocedural for the government to refuse to renew her work permit.
"The respondent's decision arrived at on October 16, 2013, refusing to renew her work permit, was contrary to the constitution, Fair Administrative Act, as well as Kenya Citizenship and Immigration Act, 2011," Justice Isaac Lenaola ruled on Thursday.
He also criticised then Interior CS Joseph ole Lenku for declaring Hannan a prohibited immigrant.
Lenaola directed the Director General of Kenya Citizens and Foreign National Management Services to extend Hannan's work permit for two more years.
He said it is in the interest of justice that the journalist be given time to finalise her pending applications,including that for citizenship.
Hannan is a former BBC journalist and has lived in the country since 1988.
After leaving BBC, she set up Voxcom Ltd, a private media company in Nairobi that produces films for humanitarian organisations including the UN, EU and Oxfam.
Her video recordings were used as evidence by civil society groups in the Supreme Court in a case challenging President Uhuru Kenyatta's election in 2013.
She was issued with a work permit in 2007, which was renewed regularly until 2013 when her presence in Kenya was said to be against national interest.
Hannan told the court that the permit was unreasonably withheld, while immigration officer Alfred Omangi asked for the case to be dismissed.