US Secretary of State John Kerry has condemned Nigeria for banning same-sex marriages and for further criminalising homosexuality.

Nigerian President Goodluck Jonathan quietly signed the strict measure into law earlier this month, but news only emerged yesterday.

According to the law, anyone who enters into a same-sex marriage, civil union or domestic partnership could face up to 14 years in prison. Additionally, same-sex marriages legally performed in other countries would be considered void by the Nigerian Government.

The law also restricts LGBT citizens from meeting in public settings.

“Beyond even prohibiting same-sex marriage, this law dangerously restricts freedom of assembly, association, and expression for all Nigerians,” John Kerry said in a statement.

“It is inconsistent with Nigeria’s international legal obligations and undermines the democratic reforms and human rights protections enshrined in its 1999 Constitution,” Mr Kerry added.

The United Nations High Commissioner for Human Rights last year condemned Nigeria’s Parliament for passing the law.

In Nigeria, the most populous country in Africa, 98% of people believe society should not tolerate homosexuality, according to a Pew Research Centre survey from last year.