MOSCOW — As president of Georgia, he survived a disastrous war with Russia. As a regional governor in Ukraine committed to fighting corruption, he clashed with just about everybody, including his estranged former ally, Ukraine’s president, Petro O. Poroshenko.

On Tuesday Mikheil Saakashvili, a onetime darling of the West, took his high-wire political career to bizarre new heights when he climbed onto the roof of his five-story apartment building in the center of Kiev, the Ukrainian capital, with law enforcement officers in hot pursuit. As a crowd of hundreds of supporters gathered below, he shouted insults at Ukraine’s leaders and, according to several local news outlets, threatened to jump if security agents tried to grab him.

Dragged from the roof after denouncing Mr. Poroshenko as a traitor and a thief, the former Georgian leader was detained but then freed by his supporters, who, amid raucous scenes on the street, blocked a security service van before it could take Mr. Saakashvili to a Kiev detention center and allowed him to escape.