Ask Gava
Kiswahili
← Your rights and the law

Is being gay legal in Kenya? What the law says on same-sex relations

Kenya Law / Supreme Court of Kenya · sources read 4 Oct 2026

Under the Penal Code, "carnal knowledge against the order of nature" is a felony punishable by up to 14 years in prison, and "gross indecency" between men by up to 5 years. The High Court upheld these sections in 2019. In 2023 the Supreme Court ruled that LGBTQ people still have the right to form and register associations.

Where
This is the law, not a service. Questions about a specific case go to a lawyer or the courts.
Read the law

Steps

  1. Section 162: anyone who has carnal knowledge of a person "against the order of nature", or allows a man to do so with them, commits a felony with up to 14 years in prison.
  2. Section 163: attempting any offence in section 162 is a felony with up to 7 years in prison.
  3. Section 165: a man who commits an act of "gross indecency" with another man, in public or in private, commits a felony with up to 5 years in prison.
  4. In 2019 the High Court (EG & 7 others v Attorney General) found sections 162(a), 162(c) and 165 not unconstitutional, so they remain law.
  5. On 24 February 2023 the Supreme Court ruled it unconstitutional to refuse to register an association purely because of its members' sexual orientation.

Watch out

  • The 2023 ruling did not change the Penal Code. The Supreme Court said everyone, whatever their orientation, can still be punished under sections 162, 163 and 165.
  • The Constitution gives every adult the right to marry a person of the opposite sex. Same-sex marriage is not recognised.

Who this covers

  • Everyone in Kenya. Section 162 applies to any person; section 165 applies to men.
Official sources (3)
  1. Penal Code (Cap. 63), Revised Edition 2014 probation.go.ke · read 4 Oct 2026
  2. NGOs Co-ordination Board v Eric Gitari & 4 others, SC Petition No. 16 of 2019, Judgment (delivered 24 February 2023) supremecourt.judiciary.go.ke · read 4 Oct 2026
  3. Constitution of Kenya, 2010 new.kenyalaw.org · read 4 Oct 2026

Was this helpful?

Share on WhatsApp · Report a mistake

Don't include your ID number or KRA PIN. We remove them if you do.