WASHINGTON — The head of the Pentagon’s Cyber Command on Monday called for swift action in Congress to sort out roles, standards and authorities for government agencies charged with defending against destructive computer attacks.

Army Gen. Keith Alexander, speaking at the American Enterprise Institute think tank, said the time for legislative action is now, before the nation is hit with a major cyberattack — an event he called increasingly likely.

“The conflict is growing, the probability for crisis is mounting,” he said. “While we have the time, we should think about and enact those things that we need to ensure our security in this area.”

Numerous agencies play a role in defending the nation’s computer infrastructure, including the Defense Department, the Department of Homeland Security and the FBI.

Referring to the prospect of a destructive — not just disruptive — attack on U.S. computer systems, Alexander said, “I do think that’s coming our way.”

Alexander made no mention of the less worrisome, but still bothersome, computer hacking that infected hundreds of thousands of personal computers around the world with malicious software as part of an online advertising scam. The FBI took down the hackers late last year and set up a temporary safety net of Internet servers. The servers were turned off Monday, but apparently only a small fraction of Internet users were left without access.