A major U.S. newspaper says the U.S. military has a secret network of private spies still operating in Afghanistan and Pakistan, despite concerns about its legality.

The New York Times says the private contractors have become "an important source of intelligence," even though Defense Department rules that prohibit the hiring of contractors for spying.

The Times noted the U.S. military is "largely prohibited from operating inside Pakistan."

Earlier in the year, U.S. government officials said the network of spies had been shut down, saying it was a rogue operation.

The paper said the private spies are being paid under a $22-million contract managed by defense corporation Lockheed Martin and supervised by the Pentagon office in charge of special operations policy.

The New York Times says its report about the continuing spy operation is based on interviews with more than a dozen current and former government officials and businessmen, in addition to a number of government documents.

Some information for this report was provided by AFP.