A pregnant woman is among 10 people who have been held hostage on a bus in Ukraine for more than 12 hours.
All hostages were freed unharmed after police captured the assailant who they said was armed and carrying explosives.
The man has been named by police as Maksim Krivosh, a 44-year-old Ukrainian born in Russia who was jailed for 10 years over multiple charges including robbery, fraud and illegal arms handling.
At one point during the siege which ended on Wednesday morning (Australian time), the assailant fired his gun at deputy chief of national police, Yevhen Koval, who was negotiating with him. He narrowly missed.
Krivosh also fired several shots at a police drone and threw explosives out of a bus window, but no one was hurt.
Police sealed off the centre of Lutsk, a city 400km west of the capital Kiev.
Ukraine’s Interior Minister Arsen Avakov said Krivosh was an “unstable man who invented his own world”.
Deputy Interior Minister Anton Gerashchenko later revealed Krivosh had called the police himself after taking control of the bus and introduced himself as Maksim Plokhoy.
He demanded that top Ukrainian officials release statements on their social media pages calling themselves terrorists.
In a Telegram account reportedly belonging to him, he said “the state has always been and always is the first terrorist”.
In a surreal twist to secure the hostages’ release, President Volodymyr Zelenskiy said he spoke to Kryvosh by phone and agreed to one of his demands, to promote the 2005 animal rights documentary Earthlings, narrated by Hollywood actor Joaquin Phoenix.
Mr Zelenskiy did so in a six-second clip posted on the presidential Facebook page, which was subsequently deleted.
Minutes later, the assailant surrendered to police and authorities said all hostages were freed.
“I congratulate all those who fought all day for the release of the people in Lutsk and, in fact, for their lives,” Mr Zelenskiy said on Tuesday evening (local time).
According to reports, Krivosh tried to reach out to journalists through hostages and their phones, demanding that they spread the word about his demands and get more reporters to arrive at the scene.
Ukrainian media reported that gunshots were regularly heard at the scene.
It wasn’t immediately clear whether anyone was injured.