Yahoo is recommending all users should change their passwords if they have not done so since 2014.
In the UK, ISPs Sky and BT issued warnings for customers that they may be affected by the breach as Yahoo provides email services for both ISPs.
Sky estimates that it had about 2.5 million Sky.com email account holders at the time of the breach. It said not all were affected but would advise everyone with a Sky.com email account to update their password.
BT said it was carrying out its own investigation but advised the “minority” of its customers who use Yahoo mail to change their passwords.
Questions for Yahoo – Dave Lee, BBC North America technology reporter, San Francisco
The nature of the information stolen feels somewhat run-of-the-mill – no payment info, and passwords were encrypted. Good. But the chain of events leading up to this unprecedented announcement gives rise to some incredibly pressing questions for Yahoo.
Why did it take so long to confirm the hack and its scale? Why did it take so long to tell users and prompt them to protect themselves?
State-sponsored attacks are typically for political, not financial gain. So why were details reportedly being sold online? What evidence is there that it was state-sponsored?
Verizon, which has agreed to buy Yahoo, said it had not been told until a couple of days ago – why not? And why is Marissa Mayer, a chief executive who has presided over bad deals and now the biggest breach in internet history, still in charge?
Follow Dave on Twitter @DaveLeeBBC
In July, Yahoo was sold to US telecoms giant Verizon for $4.8bn (£3.7bn).
Verizon told the BBC it had learned of the hack “within the last two days” and said it had “limited information”.
It added: “Until then, we are not in position to further comment.”
Yahoo said in a statement: “Online intrusions and thefts by state-sponsored actors have become increasingly common across the technology industry.”
Reuters reported three unnamed US intelligence officials as saying they believed the attack was state-sponsored because it was similar to previous hacks linked to Russian intelligence agencies.
Nikki Parker, vice-president at security company Covata, said: “Yahoo is likely to come under intense scrutiny from regulators, the media and public and rightly so. Corporations can’t shy away from data breaches and they must hold their hands up and show that they are committed to resolving the problem.”
She added: “Let’s hope the ink is dry on the contract with Verizon.”
Hack attacks
Image caption The attacks on Yahoo have meant some users like Ali Attas have been hit by hackers
Attacks on Yahoo have led to some users of the service being hit by hackers. Japan-based writer and journalist Ali Attas said he was devastated when he logged on to his email to find that everything he had sent and received for the last 20 years had disappeared.
“I’ve lost hundreds of contacts and a lot of very sensitive stuff,” said Mr Attas, who lives near Yokohama. “It’s devastating.”
“My 20 year history has been wiped out. The damage is beyond repair.”
In addition to all his personal and work contact details he said the vanished emails also included educational manuscripts he had submitted to publishing houses and a book idea which had been sent to a publisher in New York.
Fortunately he had back-up copies of some of his work.
He said he had set up a new account and emailed Yahoo to see if they can help him recover his work but had yet to receive a reply.
Questions are being asked about the length of time it took Yahoo to fully acknowledge the breach.
“It is really worrying that a breach from 2014 can have gone undetected for so long,” said Prof Alan Woodward from the University of Surrey.
“It is also surprising the public statement took so long to appear.”
“I would have thought most companies had learned by now that early disclosure is better, even if you have to revise and update as you learn more.”
The scale of the hack eclipses other recent, major tech breaches – such as MySpace (359 million), LinkedIn (164 million) and Adobe (152 million).