BOUND BROOK, N.J. — While residents of Ukraine’s capital, Kiev, laid flowers and candles on the square where protesters died in a popular uprising five years ago, the country’s president was in New York on Wednesday to commemorate the anniversary.

In a speech to the United Nations and in meetings with the Ukrainian-American diaspora in New Jersey, President Petro O. Poroshenko expressed gratitude for international backing for Ukraine.

“For five years, the Ukrainian people have been living amid the longest hot conflict in Europe in its modern history,” Mr. Poroshenko said at the United Nations, speaking of the war with Russian-backed separatists in eastern Ukraine. “Almost daily, we lose our best sons and daughters.”

Mr. Poroshenko is also facing an election next month in which the diaspora vote is seen as pivotal to his hopes. His popularity, dented by accusations of corruption, has dipped sharply at home, but Ukrainians abroad have rallied around the president and his government, with many sending money, warm clothes and even weapons to the Ukrainian Army.