British cyber spies have been playing a key role in defending Ukraine from widespread Russian cyber attacks since the start of the invasion, it has been confirmed.
The damage caused by Russian hackers would have been "very significant" without the British assistance, Leo Docherty, a junior foreign office minister, said.
He told Sky News the UK has also bolstered its own cyber defences because of "a very significant cyber threat from Russia".
"We're already on the frontline… We are aware of the threat. We have raised our own preparations and our own defences," Mr Docherty said.
"That's why we've got some deep expertise when it comes to cyber defence and that's why we've been very pleased to share it with our Ukrainian allies."
Britain has made its cyber support public because keeping it secret was no longer deemed necessary, officials said - an indication that the Kremlin was already aware.
Worth some £6.35m, the so-called Ukraine Cyber Programme was activated after President Vladimir Putin launched his full-scale war on 24 February.
Physical strikes by Russian troops and tanks against Ukrainian targets were coupled with a significant rise in cyber attacks, officials said.
A failure to deliver any major blow in cyber space was not because Russian hackers did not try but instead is believed to be thanks to Ukraine's cyber defenders, backed by experts from the cyber industry and foreign governments, including from the UK, defeating or limiting the impact of their efforts.
The UK said it was playing a leading role, helping the Ukrainian government respond to cyber attacks and protect its networks and classified information.
The British support drew on the expertise of the National Cyber Security Centre (NCSC), which is part of GCHQ.
Lindy Cameron, chief executive of the NCSC, said in a statement her centre "is proud to have played a part in supporting Ukraine's cyber defenders.
They have mounted an impressive defence against Russian aggression in cyberspace, just as they have done on the physical battlefield".
Mr Docherty played down any suggestion that the UK's decision to help Ukraine online could be seen by Russia as a direct intervention in the war.
"I think that's a perfectly honourable and not an escalatory thing to do," he said.
Instead, he likened it to the physical, but indirect, support Britain has given in providing the Ukrainian military with weapons such as artillery and anti-tank missiles.
"It's the Ukrainians at the forefront of the fight in terms of defending their homeland and… we provided some of the materiel and expertise to allow them to do that very, very efficiently."
James Cleverly, the foreign secretary, said: "The UK's support to Ukraine is not limited to military aid - we are drawing on Britain's world-leading expertise to support Ukraine's cyber defences.
"Together, we will ensure that the Kremlin is defeated in every sphere: on land, in the air and in cyber space."
The UK has also given hardware and software to bolster Ukraine's cyber defences, including firewalls to prevent attacks taking hold and protection against denial of service attacks, to ensure people can still access vital information and services.
In addition, the support involves forensic capabilities so cyber analysts in Ukraine are better able to understand who attacked them and how.