U.S. authorities on Wednesday charged seven people living in Estonia and Russia with using malicious software to hijack millions of computers worldwide to redirect Internet searches toward online ads.

Starting in 2007, the suspects created fake companies that contracted with legitimate advertiser websites to drive Internet traffic toward their Internet pages, according to a Manhattan federal court indictment.

About 4 million computers in 100 countries including the United States were infected with malicious software designed by the defendants that would redirect an Internet user's browser toward the online advertisements, the indictment said.

The defendants were paid about $14 million by advertisers based on the amount of clicks the ad pages would receive, it said.

Six Estonians were arrested on Tuesday, Manhattan U.S. attorney Preet Bharara said, while the seventh person, a Russian citizen, remains at large.

Of the roughly 500,000 infected American computers, about 130 belonged to NASA, Paul Martin, the U.S. space agency's inspector general, told reporters. It was NASA that first discovered the malicious software.

Each of the accused faces five criminal charges including conspiracy to commit wire fraud and computer intrusion. One defendant faces an additional 22 money laundering counts.

The wire fraud charges carry a maximum 30-year prison sentence.

The announcement of the case came as Estonian Defense Minister Mart Laar left Washington after a series of meetings about cybersecurity with U.S. lawmakers and officials.

Estonia has taken a leading role in pressing for better cybersecurity after it hit by the first massive denial of service attack in April 2007, an attack it blamed on Russia. Russia denies any involvement.

A U.S. law enforcement official said some of the defendants also faced criminal charges in Estonia for the suspected scheme.

A spokeswoman for the Estonian Embassy said Estonia officials worked closely with U.S. officials on the investigation that led to the arrests, a case that demonstrated the power of cross-border cooperation.

(Reporting by Basil Katz and Andrea Shalal-Esa; Editing by Cynthia Osterman)