The recapturing by Ukraine of a city held by Russian forces marks the first big test for Vladimir Putin since he declared the territory to be part of Russia.
One of his allies said on Saturday the president should consider a nuclear strike after losing Lyman, in eastern Ukraine.
The comments by Chechen leader Ramzan Kadyrov came after Ukrainian troops forced remaining Russian soldiers into retreat from the city, extending gains from a major counteroffensive across Kharkiv region deeper into neighbouring Donetsk.
Mr Putin has raised his nuclear rhetoric in recent days as his forces suffered repeated defeats.
He also triggered a series of phoney referendums on joining Russia in four regions, including Donetsk.
In the culmination of this piece of theatre, the Russian leader on Friday declared the land Russian. It means he could choose to treat any attack in the same way as an attack against the true territory of Russia, which includes responses up to the use of nuclear weapons.
The US has said it is taking Moscow's nuclear threats seriously but did not presently see indications of the use of nuclear weapons.
Jake Sullivan, the national security adviser, said on Friday that Washington was taking the risk very seriously and communicating directly with Russia about the issue, including about decisive responses the United States would take if Moscow went down "that dark road".