WASHINGTON — The United States on Thursday joined Britain in formally blaming Russia for a huge cyberattack last June that was aimed at Ukraine but crippled computers worldwide, a highly public naming-and-shaming exercise that could further fray relations with Moscow.

The White House threatened unspecified “international consequences” for the attack, which it said “was part of the Kremlin’s ongoing effort to destabilize Ukraine and demonstrates ever more clearly Russia’s involvement in the ongoing conflict.”

The statement, issued by the press secretary, Sarah Huckabee Sanders, said the attack, known by the name NotPetya, was “reckless and indiscriminate” and spread rapidly, “causing billions of dollars in damage across Europe, Asia and the Americas.”

NotPetya, which had the characteristics of a ransomware attack, had been widely identified by cybersecurity experts as coming from Russia, so the attribution was no surprise. But the decision of the United States and Britain to nearly simultaneously condemn the Russian military is noteworthy.