The Nigerian parliament has unanimously passed a bill making same-sex marriage a criminal offence punishable by up to 14 years in prison.
The BBC reports that the legislation criminalises gay clubs, societies and organisations and makes public displays of same-sex affection punishable with 10 years' jail.
The bill - which was adopted by the Senate in 2011 - is now expected to be sent to President Goodluck Jonathan to be signed into law.
It is already illegal to have gay sex in Nigeria, and homosexuals say they often suffer abuse.
A number of other African nations have already made homosexuality punishable by jail sentences.