AS he tried to concentrate on his final college exams, he couldn’t erase the terrifying images in his head, an endless replay of a video he’d seen. It showed two men being killed — their necks noosed, their bodies dragged through the streets and set on fire.

They had burned, he told me, because they were gay.

Just like him.

Islamic extremism was sweeping through Iraq, and terror coursed through his veins. It became unbearable when, in mid-2014, the Islamic State seized control of the city where he lived. He fled, traveling furtively across Iraq for nearly a month, looking for a point of exit, finally finding one and boarding a flight to a city in the Middle East where he wouldn’t be in danger.

“The greatest moment of my life was stepping on that plane,” said the man, in his mid-20s, who asked that I not use his name or any identifying details, lest harm come to family members back in Iraq. “I was able to breathe again. I hadn’t been breathing.”

On Monday, he will tell his story at a special United Nations Security Council meeting on L.G.B.T. rights. American officials involved in it arranged for me to talk with him in advance by phone.