The United States charged five Chinese military officers and accused them of hacking into American nuclear, metal and solar companies to steal trade secrets, ratcheting up tensions between the two world powers over cyber espionage, according to the Associated Press.

China immediately denied the charges, saying in a strongly worded Foreign Ministry statement the U.S. grand jury indictment was "made up" and would damage trust between the two nations, the AP reported.

Federal prosecutors said the suspects targeted companies including Alcoa Inc, Allegheny Technologies Inc, United States Steel Corp, Toshiba Corp unit Westinghouse Electric Co, the U.S. subsidiaries of SolarWorld AG, and a steel workers' union, according to the AP.

The indictment was the first criminal hacking charge that the U.S. has filed against specific foreign officials, and follows a steady increase in public criticism and private confrontation, including at a summit last year between President Barack Obama and Chinese President Xi Jinping, according to the AP.

"When a foreign nation uses military or intelligence resources and tools against an American executive or corporation to obtain trade secrets or sensitive business information for the benefit of its state-owned companies, we must say, 'Enough is enough,'" U.S. Attorney General Eric Holder said at a news conference, the AP reported.

"The administration is trying to make this clear it's a trade issue, not a cold war with China," said Jim Lewis of the Center for Strategic and International Studies, who has served as a U.S. representative in hacking negotiations with China, according to the AP.

The cyber spying charges come amid growing tensions between Washington and Beijing over China's increased assertiveness in maritime disputes with its neighbors, the AP reported.

Days after Obama ended an Asia-Pacific tour in late April, China deployed an oil drilling rig 150 miles off the coast of Vietnam, in a part of the South China Sea claimed by itself and Hanoi, which sparked deadly anti-China riots in central Vietnam last week, according to the AP.