WASHINGTON - The National Security Agency, the largest electronic spy agency in the world, is undertaking a major reorganization, merging its offensive and defensive organizations in the hope of making them more adept at facing the digital threats of the 21st century, according to current and former officials.

In place of the Signals Intelligence and Information Assurance directorates, the organizations that historically have spied on foreign targets and defended classified networks against spying, the NSA is creating a Directorate of Operations that combines the operational elements of each.

"This traditional approach we have where we created these two cylinders of excellence and then built walls of granite between them really is not the way for us to do business," said agency Director Michael Rogers, hinting at the reorganization - dubbed NSA21 - that is expected to be publicly rolled out this week.

"We've gotta be flat," he told an audience at the Atlantic Council last month. "We've gotta be agile."

Some lawmakers who have been briefed on the broad parameters consider restructuring a smart thing to do because an increasing amount of intelligence and threat activity is coursing through global computer networks.

"When it comes to cyber in particular, the line between collection capabilities and our own vulnerabilities - between the acquisition of signals intelligence and the assurance of our own information - is virtually nonexistent," said California Rep. Adam Schiff, the ranking Democrat on the House Intelligence Committee. "What is a vulnerability to be patched at home is often a potential collection opportunity abroad and vice versa."

But there have been rumblings of discontent within the NSA, which is based at Fort Meade, Md., as some fear a loss of influence or stature.

Some advocates for the comparatively small Information Assurance Directorate, which has about 3,000 people, fear that its ability to work with industry on cybersecurity issues will be undermined if it is viewed as part of the much larger "sigint" collection arm, which has about eight times as many personnel. The latter spies on overseas targets by hacking into computer networks, collecting satellite signals and capturing radio waves.

The change comes about a year after the CIA did its own revamping, ending divisions that have been in place for decades and creating new centers that team analysts with operators. The NSA's new directorate of operations also will place analysts with operators.

Rogers in a speech in December characterized the change as "among the most comprehensive" at the NSA since the late 1990s.