Nigeria's president has signed a law banning same-sex marriage as well as homosexual associations, societies and meetings, with penalties of up to 14 years in jail.

The Associated Press obtained a copy of the Same Sex Marriage Prohibition Act on Monday signed by President Goodluck Jonathan and dated Jan. 7.

Any public show of love by people of the same sex is a new crime punishable by up to 10 years in jail. It is already a crime to have homosexual sex in the West African nation.

Operating or even going to a gay club, society or organization also becomes a crime.

Secretary of State John Kerry said the United States was "deeply concerned" by a law that "dangerously restricts freedom of assembly, association, and expression for all Nigerians."