A stand-off in Ukraine has ended with security forces freeing 10 hostages from a bus in the city of Lutsk and detaining the gunman, after a bizarre intervention by the president.
Pictures showed the gunman lying on the ground after his arrest.
Just before the man's arrest, President Volodymyr Zelensky posted a short video to comply with one of his demands, saying the words: "Everyone should watch the 2005 film Earthlings."
All the hostages are unharmed.
The man has been named by police as Maksym Kryvosh, 44, who has previous convictions.
He had originally been holding 13 people but released three after talks with Mr Zelensky.
"Lutsk. Everyone is okay," Interior Minister Arsen Avakov tweeted (in Russian) following the end of the siege.
Mr Avakov was in Lutsk to lead negotiations with the gunman.
What was the president's role in the stand-off?
Mr Zelensky held talks with the hostage-taker, which his spokeswoman Yuliya Mendel said had led to the release of the first three hostages.
The president then posted a brief video on his Facebook page in which he said in Russian the words: "Everyone should watch the 2005 film Earthlings."
One of the demands of the hostage-taker had been for the president to encourage people to watch the 2005 Hollywood-made animal rights documentary.
Shortly afterwards, Mr Avakov announced the end of the siege, and Mr Zelensky deleted the video.
The film, narrated by Hollywood star Joaquin Phoenix, won several minor festival awards. It shows, sometimes with hidden cameras, the practices of major world industries which rely on animals.
How did the siege develop?
The siege began at about 09:00 local time (06:00 GMT). At one point the hostage-taker fired shots and threw explosives which did not detonate.
His demands included one that senior politicians state publicly that they were terrorists.
Officers of the counter-terrorism SBU security services surrounded the bus, and several hours of tense stand-off and negotiations ensued.
According to the prosecutor general's office, the gunman said he had placed an explosive device in a public place in the city that could be detonated remotely.
Police cordoned off the city centre and told residents not to leave their homes or offices.
It was not clear whether any device was found.
However, Mr Avakov later confirmed that Kryvosh had several functioning firearms and genuinely posed a threat.
"A lengthy prison sentence awaits him," he told journalists.
Officials said Kryvosh had previously spent around 10 years in prison on convictions including fraud and the illegal handling of weapons