Same-sex relationships aren't illegal in Egypt, but the government uses laws that state "violation of honor by threat" and "practising immoral and indecent behavior" to convict individuals suspect of engaging in gay relationships. For example, one young man was sentenced to 17 years in prison for merely placing his profile on a gay dating site.
The punishment for same-sex relationships varies by state in Nigeria. The Northern states, which follow Shariah law, declare that men who engage in same-sex relationships may be punished by death whereas women may be whipped or imprisoned. In the rest of Nigeria, same-sex relationships warrant up to a 14 year jail sentence.