Botswana's government will appeal a high court ruling that decriminalized homosexuality, potentially resuscitating a law that punished gay sex by up to seven years in prison.

Last month's landmark court ruling, which was praised by international organizations and activists, meant Botswana joined a handful of African countries that have legalized same-sex relationships.

But Attorney General Abraham Keetshabe said in a statement late Friday that the high court was mistaken in its conclusion in overturning the colonial-era law.