Ukraine staged the murder of a Russian dissident journalist in Kiev on Tuesday in what it said was a sting operation to foil a Russian assassination plot.
Arkady Babchenko sent shock waves around the world when he arrived at a news conference on Wednesday, less than 24 hours after being reported dead.
Ukrainian security chief Vasyl Hrytsak said a sting had been set up to catch hitmen paid by Russian forces.
Russia described events in Kiev as an "anti-Russian provocation".
Ukrainian police say they made one arrest.
Babchenko's wife said on Tuesday she had found her husband at the entrance to their apartment block with bullet wounds in his back, and he was reported to have died in an ambulance on the way to hospital.
That story was widely reported by media around the world, until Wednesday's sudden and extraordinary development.
There were gasps and applause at the press conference in Kiev as Babchenko entered the room. He thanked the Ukrainian security services for saving his life and said he had had no choice but to take part in the sting.
"I did my job," he said. " I'm still alive."
"I have buried many friends and colleagues many times and I know the sickening feeling," he added. "I am sorry you had to experience it. But there was no other way."
Hours after the news broke, Babchenko tweeted to say he would "die at 96" after "dancing on Putin's grave", referring to the President of Russia, Vladimir Putin.
Babchenko fled Russia in 2017 after writing a Facebook post (in Russian) about a crashed Tu-154 transport plane, which went into the Black Sea while carrying a Red Army choir to Syria.
He said this Facebook post, in which he described Russia as an "aggressor", had led to death threats and abuse from the Russian state.
What do we know about the operation?
Babchenko said he had been informed a month ago about an alleged Russian plot to kill him. He said he had agreed to co-operate with a counter-operation and had been in constant contact with Ukrainian security services over the course of the past month.
He added that he thought security services had been planning the operation for up to two months.
Mr Hrytsak said the operation had begun after Ukrainian security services were informed about a Russian plot to kill the journalist.
He alleged that Russian security forces had recruited a Ukrainian citizen to find hitmen within Ukraine. He said the citizen had approached several acquaintances, including war veterans, offering $30,000 (£22,600) for the contract killing, one of whom revealed the plot to the security services.
The security services then informed Babchenko, apparently determining that the only way to reveal the plotters was to stage a fake hit.
Babchenko said that his wife Olga and his children had been aware of the plan but he publicly apologised to her at the press conference. "I am terribly sorry," he said, "but there were no other options."
Mr Hrytsak said the man detained by police was the Ukrainian who had allegedly attempted to find a hitman.
Russia's foreign ministry condemned the staged assassination, calling it "obviously yet another anti-Russian provocation".
Spokeswoman Maria Zakharova described the operation as "a masquerade" done for "propagandistic effect". She added that Russia was happy that Babchenko was alive, saying: "I wish it were always like that."
Ukrainian President Petro Poroshenko said the country would offer protection to Babchenko. "It is unlikely that Moscow will calm down," he said on Twitter. "I've given an order to provide Arkady and his family with protection."
The Radio Free Europe/Radio Liberty network posted video footage of Babchenko's colleagues reacting to news that he was alive.
Реакція журналістів ATR 😍— Радіо Свобода (@radiosvoboda) May 30, 2018
Відео - Kateryna Lisunova pic.twitter.com/GmkBcXc157
But many expressed reservations over the tactics used by the Ukrainian security services. Campaign group Reporters Without Borders condemned the operation as a "pathetic stunt".
"It is pathetic and regrettable that the Ukrainian police have played with the truth, whatever their motive," the head of the organisation, Christophe Deloire, told AFP news agency.
The Committee to Protect Journalists demanded that the authorities explain "what necessitated the extreme measure", describing it in a tweet as an "unprecedented situation".
Russian investigative journalist Andrei Soldatov, a former colleague of Babchenko, said the sting had "crossed a line big time".
"Babchenko is a journalist not a policeman, for Christ sake, and part of our job is trust, whatever Trump & Putin say about fake news," he wrote on Twitter. "I'm glad he is alive, but he undermined even further the credibility of journalists and the media."
Simon Ostrovsky, a journalist and friend of Babchenko, told the BBC he felt "anger and relief in equal measure".
“From being incredibly gloomy and sad yesterday... to frankly anger today, we’ve all been hoodwinked and made to believe our friend died."
A glaring example of 'fake news'
Frank Gardner, BBC Security Correspondent
There can be few more glaring examples of 'fake news' than the deliberate misreporting by a sovereign government of a prominent journalist's death.
Relations between Russia and Ukraine are at an all-time low, following Moscow's annexation of Crimea and the ongoing conflict in eastern Ukraine, and Russia has been accused of several recent deaths of Kremlin critics in Ukraine.
But this staged non-death will inevitably muddy the waters. Russia already denies any involvement in the attempted assassination of its former spy Sergei Skripal in the UK city of Salisbury in March, calling it fake news.
It will now likely seize on this deception in Kiev to strengthen its claim in that case, and in others.
Deaths in Kiev
Kiev has in recent years seen a number of deadly attacks on high-profile figures, including journalists and politicians. Most of them were vocal critics of the Kremlin.
The leading Belarusian journalist and Kremlin critic, Pavel Sheremet, was killed by a car bomb in Kiev in July 2016.
Another car bomb killed Ukrainian military intelligence officer Col Maxim Shapoval in June 2017 in what the Ukrainian authorities called a terrorist act.
In March of the same year, former Russian MP Denis Voronenkov was shot dead outside a hotel in Kiev.