Gay men living in the Ivory Coast were forced to flee their homes after the U.S. embassy posted a photo on its website identifying the men as members of the LGBT community.
The photo shows a group of six men signing a condolence book for victims of the Orlando gay bar massacre last month.
Four of the six men in the photo say they were forced to flee their homes in fear for their lives after family and friends discovered they were gay.
Two of the men said they were punched and kicked by an angry mob who recognized their faces from the photo.
The men told the Associated Press the mob attacked them while "shouting anti-gay slurs."
They men said they did not authorize the U.S. embassy to identify them as members of the gay community in the photo.
The photo is still available - without the faces obscured - on the embassy website.
Embassy press officer Elizabeth Ategou said the embassy received no requests to take the photo down.
Ategou told the AP the embassy "deeply regrets that any individuals were attacked based on any kind of orientation they might have."
She said the embassy was in contact with the men and urged them to report the attacks to police.
The U.S. Embassy in Abidjan provided outreach to the LGBT community in 2011 after U.S. President Obama issued a directive to "all agencies engaged abroad" to promote homosexuality and protect the "human rights of sexual minorities."