The web company has advised all users who have not changed their password since then to do so now, and is contacting affected users who may need to change their security questions.

The scale of the breach was revealed as news of a separate hack attack emerged. The White House said on Thursday it was looking into a cyber breach after what appeared to be a scan of first lady Michelle Obama's passport was posted online.

The Yahoo breach is larger than many were expecting, after reports in August suggested that 200m accounts could be affected.

Yahoo did not specify which state it believes was behind the theft, nor did it spell out where the affected users are located around the world.

“Online intrusions and thefts by state-sponsored actors have become increasingly common across the technology industry,” the company said. “Yahoo and other companies have launched programmes to detect and notify users when a company strongly suspects that a state-sponsored actor has targeted an account.”