UN Secretary-General Ban Ki-moon has announced that the United Nations is recognizing the gay marriages of all its staffers.

Previously, the United Nations only recognized the unions of staffers who came from countries where gay marriage is legal, UN deputy spokesman Farhan Haq said Monday.

Haq adds that "this is a step forward that many of the staffers at the United Nations had been seeking for some time."

Haq says the new policy became effective June 26.

According to the Pew Research Center, gay marriage is legal in 18 countries, plus parts of the United States and Mexico.

But prejudice remains deep in many countries. An extreme case is Uganda, which in February passed a law making gay sex punishable by a life sentence.