A group of African countries has failed in their second attempt to block a United Nations (UN) expert from working on gender based and LGBT violence.

Thai law professor Vitit Muntarbhorn became the first ever UN investigator with a mandate to examine violence and discrimination against the LGBT communities worldwide when he was appointed in September.

But the bloc of mainly African states led by Burkina Faso, have twice tried to pass an amendment to delay his appointment.

They claimed there "is no international agreement on the definition of the concept of 'sexual orientation and gender identity.'"

After being defeated on the first vote in November, their attempt to delay Mr Muntarbhorn’s appointment was beaten again, by 86 votes to 77, with 16 abstentions, earlier this week.

While gay rights supporters welcomed the result, the close vote reflected deep international divisions on gay rights.

The UN has heightened the focus on LGBT rights in recent years but has faced consistent opposition from some member states, particular those from Africa, the Middle East and China and Russia.

Iran and Saudi Arabia also voted in favour of the amendment. Western and a number of Latin American countries were among those in favour of his appointment.

Graph demonstrates the areas in the world where homosexuality remains illegal (Washington Post)

At least 76 countries enforce laws which discriminate against LGBT people, according to a UN report, including legislation which criminalises consensual same-sex relationships among adults.

US ambassador to the UN, Samantha Power, led the campaign against the amendment.

She said international norms on violence and discrimination based on sexual orientation and gender identity are "well established" and have been referred to in UN statements and resolutions including in the General Assembly and Security Council.

LGBT+ rights around the globe Show all 9 1 /9 LGBT+ rights around the globe LGBT+ rights around the globe Russia Russia’s antipathy towards homosexuality has been well established following the efforts of human rights campaigners. However, while it is legal to be homosexual, LGBT couples are offered no protections from discrimination. They are also actively discriminated against by a 2013 law criminalising LGBT “propaganda” allowing the arrest of numerous Russian LGBT activists. AFP/Getty LGBT+ rights around the globe Brunei Brunei recently introduced a law to make sodomy punishable by stoning to death. It was already illegal and punishable by up to 10 years in prison AFP/Getty LGBT+ rights around the globe Mauritania Men who are found having sex with other men face stoning, while lesbians can be imprisoned, under Sharia law. However, the state has reportedly not executed anyone for this ‘crime’ since 1987 Alamy LGBT+ rights around the globe Sudan Both male and female same-sex sexual activity is illegal under Sudanese law. Men can be executed on their third offence, women on their fourth Getty LGBT+ rights around the globe Saudi Arabia Homosexuality and gender realignment is illegal and punishable by death, imprisonment, whipping and chemical castration Getty LGBT+ rights around the globe Yemen The official position within the country is that there are no gays. LGBT inviduals, if discovered by the government, are likely to face intense pressure. Punishments range from flogging to the death penalty Getty LGBT+ rights around the globe Nigeria Both male and female same-sex sexual activity is illegal and in some northern states punishable with death by stoning. This is not a policy enacted across the entire country, although there is a prevalent anti-LGBT agenda pushed by the government. In 2007 a Pew survey established that 97% of the population felt that homosexuality should not be accepted. It is punishable by 14 years in prison Reuters LGBT+ rights around the globe Somalia Homosexuality was established as a crime in 1888 and under new Somali Penal Code established in 1973 homosexual sex can be punishable by three years in prison. A person can be put to death for being a homosexual Reuters LGBT+ rights around the globe Iraq Although same-sex relationships have been decriminalised, much of the population still suffer from intense discrimination. Additionally, in some of the country over-run by the extremist organisation Isis, LGBT individuals can face death by stoning Getty

"In reality, this amendment has little to do with questions around the definition of sexual orientation and gender identity," Power said. "Instead, this amendment is rooted in a real disagreement over whether people of a certain sexual orientation and gender identity are, in fact, entitled to equal rights."

Pooja Patel, who manages the organisation's LGBT rights program, called Monday's outcome a victory for equality.

Discrimination and violence faced by lesbian, gay, bisexual and transgender people around the world "is real and needs to be combated," she said, adding the close vote shows how much work is needed to build bridges with many countries.