Acting Assistant Attorney General of National Security Mary McCord (L) speaks during a press conference to announce criminal charges against three Russians for the 2014 hacking of Yahoo at the US Department of Justice March 15, 2017 in Washington, DC / Getty

The indictment comes as the US continues to investigate cyber-attacks on the election and their relation to Donald Trump

The US has brought hacking charges against Russian officials for the first time ever.

The decision comes as federal officials continue to investigate whether Russian spies interfered with the 2016 presidential election by hacking the Democratic party, among others. The country launched cyber-attacks that were calculated to help Donald Trump win the election, it has been claimed by intelligence agencies and some politicians.

Though the Justice Department has previously charged Russians with cyber-crime – and brought prosecutions against hackers sponsored by the Chinese and Iranian governments – the new indictments are the first time a criminal case has been brought against Russian government officials.

US officials said that the Russian defendants had used the hack to gain information about millions of subscribers to Yahoo, Google and other webmail providers. They also attacked people including Russian journalists, government officials said.

The attacks began as early as 2014, prosecutors said, and though the hackers lost access in September 2016 they continued to use the information until at least the end of the year, according to officials.

The indictment doesn't make any connection between the Yahoo hacking and the later attacks on the Democratic National Committee, said acting assistant attorney general Mary McCord.

"We're here for one of the largest data breaches in US history," Ms McCord said.

"Today we are announcing the indictment of four individuals responsible for the 2014 hacking... of Yahoo, the theft of information about at least 500 million Yahoo accounts, and use of that information to obtain the contents of accounts at Yahoo and other providers."

FBI executive assistant director Paul Abbate said: "We are extremely grateful as well to our international partners for their assistance and support leading up to these criminal charges today.

"Those partners include Canada's Royal Canadian Mounted Police and, as mentioned, the Toronto police service and their fugitive squad.

"As well, the United Kingdom's MI5 made substantial contributions to the advancement of this investigation also."