The National Security Agency has secretly broken into the main communications links that connect Yahoo and Google data centers around the world, according to documents obtained from former NSA contractor Edward Snowden and interviews with knowledgeable officials.

By tapping those links, the NSA has positioned itself to collect at will from among hundreds of millions of user accounts, many of them belonging to Americans. The agency does not retain everything it collects, but it keeps a lot.

According to a top secret accounting dated Jan. 9, the NSA acquisitions directorate sends millions of records every day from Yahoo and Google internal networks to data warehouses at the agency's Fort Meade headquarters. In the preceding 30 days, the report said, field collectors had processed and returned 181,280,466 new records — ranging from "metadata," which would indicate who sent or received emails and when, to content, such as text, audio and video.