23, 2010 file photo, Army Gen. Keith B. Alexander, commander of the U.S. Cyber Command, testifies on Capitol Hill in Washington. Foreign leaders are deterred from launching a major electronic attack on vital infrastructure in the U.S. because they know such a strike could be traced to its source and would generate a robust response, Alexander, the military's top cyber warrior said during congressional testimony Tuesday. WASHINGTON (AP) - The Defense Department is establishing a series of cyber teams charged with carrying out offensive operations to combat the threat of an electronic assault on the United States that could cause major damage and disruption to the country's vital infrastructure, a senior military official said Tuesday. Gen. Keith Alexander, the top officer at U.S. Cyber Command, warned during testimony that the potential for an attack against the nation's electric grid and other essential systems is real and more aggressive steps need to be taken by the federal government and the private sector in order to improve digital defenses. Alexander told the Senate Armed Services Committee that foreign leaders are deterred from launching cyberattacks on the United States because they know such a strike could be traced to its source and would generate a robust response. But the country is not preventing what Alexander called "low-level harassment of private and public websites, property and information by other states." Offensive cyber weapons are growing and evolving, Alexander said, and it is only a matter of time before tools developed by other nations wind up in the hands of extremist groups or even individuals who could do significant harm. Alexander said 13 cyber teams are being formed for the mission of guarding the nation in cyberspace. He described them as "defend-the-nation" teams but stressed their role would be offensive. In comments to reporters after the hearing, Alexander likened the teams' duties to knocking an incoming missile out of the sky before it hits a target. He also said the teams would work outside the United States, but he did not say where. He also said another 27 cyber teams are being established to support the military's warfighting commands while others will protect Defense Department's computer systems and data. But even as Alexander detailed these moves, he pushed lawmakers to pass cybersecurity legislation that would make it easier for the government and the private sector - which controls critical infrastructure such as the electric grid, banking systems, chemical facilities and water treatment systems - to share detailed information about who is getting hacked and what to do about it. President Barack Obama signed an executive order last month that relies heavily on participation from U.S. industry in creating new voluntary standards for protecting information and expands the government's effort to provide companies with threat data. The general also told the committee that there needs to be a clear consensus on how the nation is organized to protect critical infrastructure from cyberattacks. Another issue that still needs to be settled is what constitutes an act of war in cyberspace, Alexander said. He does not consider cyberespionage and the theft of a corporation's intellectual property to be acts of war. But Alexander said, "I think you've crossed the line" if the intent is to disrupt or destroy U.S. infrastructure. Sen. Carl Levin, D-Mich., the committee's chairman, noted that Obama recently issued a classified policy directive to govern cyber operations. The Pentagon also has developed a list of procedures on how to respond in "cyber crisis" situations, he added, and the Pentagon is expected to issue cyber rules of engagement for military commanders. Alexander's testimony comes a day after Obama's national security adviser called for "serious steps" by China to stop cyber theft that has become intolerable to the international community. The Chinese government denied being involved in cyber theft, with China's defense minister calling the Mandiant report deeply flawed. After the hearing, Alexander said he saw no reason to amplify Donilon's remarks. "I agree with what Tom Donilon has put out there," he said. I think it is absolutely on mark. Follow Richard Lardner on Twitter: https://twitter.com/rplardner