Among those targeted in the alleged Russian hacking were journalists, government officials and businesses. The indictment is the first time US officials have formally charged Russian officials for cybercrime.
The US government on Wednesday formally charged two Russian intelligence officers and two criminal hackers, accusing them of stealing information from at least 500 million Yahoo accounts.
The four engaged in "computer hacking, economic espionage and other criminal offenses" in one of the largest cyber crimes in US history, the Justice Department said.
The two spies from Russia's FSB intelligence service allegedly paid and facilitated two hackers to steal information from Yahoo accounts and used that information to access other accounts of interest at Yahoo, Google and other webmail providers.
Russian journalists, US and Russian government officials, employees of the financial sector and other companies were among those targeted in the hacking, officials said.
"Some victim accounts were of predictable interest to the FSB, a foreign intelligence and law enforcement service," the Justice Department said.
The FSB agents also allegedly allowed one of the hackers to benefit financially by searching Yahoo accounts for credit card and gift card account numbers. The hacker also redirected Yahoo search engine traffic to make commissions and stole contact information from at least another 30 million Yahoo accounts to send out spam.
"The involvement and direction of FSB officers with law enforcement responsibilities makes this conduct that much more egregious," acting Assistant Attorney General Mary McCord said. "There are no free passes for foreign state-sponsored criminal behavior."
According to the indictment, the cybercrime was carried out from at least January 2014 until September 2016, but the Justice Department said information stolen information continued to be used up until at least December 2016.
The announcement comes as US authorities investigate Russian interference in the 2016 US election through a hacking campaign. US authorities have accused the Russian, Iranian and Chinese governments of other cybercrimes, but Wednesday's indictment is the first time a criminal case has been brought against Russian officials.
FSB officers Dmitry Aleksandrovich Dokuchaev and Igor Anatolyevich Sushchin were named in the indictment. They are both in Russia.
One of the hackers, Alexsey Alexseyevich Belan, has been on the FBI's Cyber Most Wanted criminals since November 2013. He has two other US indictments against from 2012 and 2013. Belan was arrested in a European country in 2013, but escaped to Russia before extradition.
The fourth defendant, Karim Baratov, is a Canadian and Kazakh national. He was arrested in Canada on March 15. US authorities are seeking his extradition.