Nigeria's Senate has voted to outlaw same-sex marriage and public displays of affection by homosexuals.
The bill must be approved by the House of Representatives and signed by President Goodluck Jonathan before becoming law.
British Prime Minister David Cameron recently threatened to withhold aid from countries that violate the rights of gays and lesbians.
However, homosexuality is broadly rejected in this nation of roughly 150 million people, the most populous in Africa, which is divided by Christians and Muslims who almost uniformly oppose homosexuality.
The measure, passed Tuesday, would sentence anyone who enters a same-sex marriage to 14 years in prison.
Anyone who publicly displays "same-sex amorous relationships" or helps homosexuals marry could receive a 10-year jail term.
During debate on measure, Senate President David Mark said the bill reflects Nigeria's values and argued no other country should interfere with its laws.