By Pavel Polityuk and Tom Balmforth
KYIV/MOSCOW (Reuters) - Ukrainian government websites were splashed with a warning to "be afraid and expect the worst" as a massive cyberattack hit the country, while a U.S. official voiced fears that Russia was preparing to attack its neighbour if diplomacy failed.
The cyberattack unfolded hours after talks wrapped up on Thursday with no breakthrough between Moscow and Western allies. On Friday, Russia, which has massed 100,000 troops on Ukraine's border, released pictures of more of its forces on the move.
Kyiv said President Volodymyr Zelenskiy had proposed a three-way meeting with the leaders of Russia and the United States. Zelenskiy's chief of staff, Andriy Yermak, said the "life and death" of his country hung in the balance.
A U.S. official said Washington was concerned that Russia was preparing for the possibility of a new military assault on a country it invaded in 2014.
"As part of its plans, Russia is laying the groundwork to have the option of fabricating a pretext for invasion, including through sabotage activities and information operations, by accusing Ukraine of preparing an imminent attack against Russian forces in eastern Ukraine," the official said, speaking on condition of anonymity.
Kremlin spokesperson Dmitry Peskov later dismissed such reports as based on "unfounded" information, TASS news agency reported.
Russia denies plans to attack Ukraine but says it could take unspecified military action unless its demands - including a promise by the NATO alliance never to admit Kyiv - are met.
Foreign Minister Sergei Lavrov said that Russia hoped security talks with the United States would resume but that this would depend on Washington's response to Moscow's proposals.
"We categorically will not accept the appearance of NATO right on our borders, especially so given the current course of the Ukrainian leadership," he said.
Asked what Moscow meant by threatening this week to take "military-technical action" if talks fail, Lavrov said: "Measures to deploy military hardware, that is obvious. When we take decisions with military hardware we understand what we mean and what we are preparing for."
Russian Defence Ministry footage released by RIA news agency showed armoured vehicles and other military hardware being loaded onto trains in Russia's far east, in what Moscow called an inspection drill to practice long-range deployments.
"This is likely cover for the units being moved towards Ukraine," said Rob Lee, a military analyst and a fellow at the U.S.-based Foreign Policy Research Institute.
"EXPECT THE WORST"
Ukrainian officials were investigating the huge cyberattack, which they said hit around 70 internet sites of government bodies including the foreign ministry, cabinet of ministers, and security and defence council.
Though they avoided directly accusing Moscow, Ukraine's foreign ministry spokesperson told Reuters that Russia had been behind similar strikes in the past.
A spokesperson for the White House National Security Council said it was not yet clear who was responsible for the cyberattack but that Biden had been briefed on it.
"We are in touch with the Ukrainians and have offered our support," the spokesperson said.
Russia did not comment but has previously denied being behind cyberattacks, including against Ukraine.
"Ukrainian! All your personal data was uploaded to the public network. All data on the computer is destroyed, it is impossible to restore it," said a message visible on hacked government websites, written in Ukrainian, Russian and Polish.
"All information about you has become public, be afraid and expect the worst. This is for your past, present and future."
The message left by the cyberattack was peppered with references that echoed long-running Russian state allegations, rejected by Kyiv, that Ukraine is in thrall to far-right nationalist groups.
The Ukrainian government said it had restored most of the affected sites and no personal data had been stolen.
NATO responded by announcing that it would sign a new agreement within days with Kyiv on closer cooperation in cyber defence, including giving Ukraine access to the Western military alliance's system for sharing information on malicious software.
Secretary-General Jens Stoltenberg said in a statement that NATO cyber experts were already working with the Ukrainian authorities to respond to the attack, both remotely from Brussels headquarters and on the ground in Ukraine.
The European Union's top diplomat, Josep Borrell, condemned the cyberattack and said the EU's political and security committee and cyber units would meet to see how to help Kyiv: "I can't blame anybody as I have no proof, but we can imagine."
On the streets of Ukraine, there was growing resignation to the prospect of renewed fighting. Kyiv resident Ruslan Kavatsyuk, 39, said he saw the cyberattack as a "positive", since it would stiffen the resolve of the Ukrainian public.
"It reminds us that we live during military times, that Russia is an enemy who will kill us physically," he said.
(Additional reporting by Matthias Williams in Kyiv, Anton Kolodyazhnyy, Tom Balmforth and Andrew Osborn in Moscow, Sabine Siebold and John Irish in Brest, France; Writing by Mark Trevelyan, Peter Graff and Alex Richardson; Editing by Alison Williams, Hugh Lawson and John Stonestreet)