MOSCOW — A fire broke out on Saturday in a high-rise that until recently had been called Trump Tower in Baku, the capital of Azerbaijan, engulfing much of the building in flames by early evening.

Footage on social media showed flames shooting out of the windows and smoke billowing from the 33-floor building, which is still under construction and had been labeled “Donald Trump’s Worst Deal” by The New Yorker magazine.

The blaze, which broke out on the top floor of the building, burned down through about 20 stories before firefighters extinguished the flames by midafternoon, the news agency Interfax reported.

The fire rekindled in the evening, burning through much of the building, a video posted by the Russian news portal Lenta.ru showed.